3.2.29 dump
dump
This function causes an immediate core dump.
Primarily this is so that you can use
undump
(1) to turn
your core dump into an executable binary after having initialized all
your variables at the beginning of the program.
(The
undump
program is not supplied with the Perl distribution,
and is not even possible on some architectures. There are hooks in
the code for using the GNU #!/usr/bin/perl use Getopt::Std; use MyHorridModule; %days = ( Sun => 1, Mon => 2, Tue => 3, Wed => 4, Thu => 5, Fri => 6, Sat => 7, ); dump QUICKSTART if $ARGV[0] eq '-d'; QUICKSTART: Getopts('f:'); ...
This startup code does some slow initialization code, and then calls
the
dump
function to take a snapshot of the program's state.
When the dumped version of the program is run, it bypasses all the
startup code and goes directly to the If you're looking to use dump to speed up your program, check out the discussion of efficiency matters in Chapter 8, Other Oddments , as well the Perl native-code compiler in Chapter 6 . You might also consider autoloading, which at least makes it appear to run faster. |
|