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;
$xxx{'zzz'}->[3];
1;


compare to:

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

Leave a comment

About Flávio S. Glock

user-pic I blog about Perl.