INIT { exit } #### #!/usr/bin/env perl use strict; use warnings; use autodie ':all'; use Moose; BEGIN { print "BEGIN block\n"; } sub should_not_run { print "&should_not_run ran!\n"; } should_not_run(); print "This shouldn't print\n"; INIT { exit } INIT { print "This INIT shouldn't run.\n" } #### $ pm_1198271_prof_compile_only.pl BEGIN block #### $ perl -d:NYTProf pm_1198271_prof_compile_only.pl BEGIN block $ nytprofhtml Reading nytprof.out Processing nytprof.out data Writing line reports to nytprof directory 100% ... Extracting subroutine call data ... Extracting subroutine links Generating subroutine stack flame graph ...