Syntactic Confectionery Delight | |
PerlMonks |
perlman:B::Deparseby root (Monk) |
on Dec 23, 1999 at 00:50 UTC ( [id://1158]=perlfunc: print w/replies, xml ) | Need Help?? |
B::DeparseSee the current Perl documentation for B::Deparse. Here is our local, out-dated (pre-5.6) version: B::Deparse - Perl compiler backend to produce perl code
perl -MO=Deparse[,-uPACKAGE][,-p][,-l][,-sLETTERS] prog.pl
B::Deparse is a backend module for the Perl compiler that generates perl source code, based on the internal compiled structure that perl itself creates after parsing a program. The output of B::Deparse won't be exactly the same as the original source, since perl doesn't keep track of comments or whitespace, and there isn't a one-to-one correspondence between perl's syntactical constructions and their compiled form, but it will often be close. When you use the -p option, the output also includes parentheses even when they are not required by precedence, which can make it easy to see if perl is parsing your expressions the way you intended. Please note that this module is mainly new and untested code and is still under development, so it may change in the future.
OPTIONSAs with all compiler backend options, these must follow directly after the '-MO=Deparse', separated by a comma but not any white space.
BUGSSee the 'to do' list at the beginning of the module file.
AUTHORStephen McCamant <alias@mcs.com>, based on an earlier version by Malcolm Beattie <mbeattie@sable.ox.ac.uk> |
|