B-CompilerPhase-Hook
view release on metacpan or search on metacpan
lib/B/CompilerPhase/Hook.pm view on Meta::CPAN
enqueue_CHECK { print " 5. CHECK blocks run LIFO after all compilation.\n" }
enqueue_INIT { print " 8. Run this again, using Perl's -c switch.\n" }
}
print "12. This is anti-obfuscated code.\n";
BEGIN {
enqueue_END { print "14. END blocks run LIFO at quitting time.\n" }
enqueue_BEGIN { print " 2. So this line comes out second.\n" }
enqueue_UNITCHECK { print " 3. UNITCHECK blocks run LIFO after each file is compiled.\n" }
enqueue_INIT { print " 9. You'll see the difference right away.\n" }
}
print "13. It only _looks_ like it should be confusing.\n";
# With apologies to the `BEGIN-UNITCHECK-CHECK-INIT-and-END` section of `perlmod`
=head1 DESCRIPTION
This module makes it possible to enqueue callbacks to be run during
the various Perl compiler phases, with the aim of doing multi-phase
meta programming in a reasonably clean way.
=head1 FUNCTIONS
( run in 0.421 second using v1.01-cache-2.11-cpan-607d282f910 )