April 2012 Archives

running perl with -MO=Deparse in node.js

I've hacked a '-MO=Deparse' option to perlito5. Now I can check the parser by comparing the output with perl:

$ node perlito5.js -Isrc5/lib -MO=Deparse -e ' ${ xxx{zzz}[3] } '
# Do not edit this file - Generated by Perlito5 9.0
use v5;
use Perlito5::Perl5::Runtime;
package main;

compare to:

$ perl -MO=Deparse -e ' ${ xxx{zzz}[3] } '
-e syntax OK

About Flávio S. Glock

user-pic I blog about Perl.