home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


8.14 B::Deparse

Perl compiler backend that generates Perl source code from the internal compiled structure of a program. The output won't be exactly the same as the original program, but it will be close. Invoke as:

perl -MO=Deparse[,
options
] 
program
program is the name of the program to be deparsed. The options are comma-separated and follow normal backend option conventions. The possible options are:
-l

Adds #line declarations to the output based on line and file locations of the original code.

-p

Prints parentheses wherever they are legal, not just where they are required. Useful for seeing how Perl is parsing your expressions.

-sletters

Provides style options for the output. In this initial release, the only style option provided is C , which "cuddles" else , elsif , and continue blocks so that, for example, you would get:

} else {
instead of:
}
  else {
The default is to not cuddle.

-uPackage

Deparses subroutines in package Package as well as the main program, subroutines called by the main program, and subroutines in the main program. Multiple -u arguments can be given, separated by commas.