in reply to Re^2: extract all subroutines from .pm's and include in .pl
in thread extract all subroutines from .pm's and include in .pl

You don't even need the BEGIN block:

Maybe not in the examples shown, but what if Inline::Foo has a package global, or has some initialization code outside of the subs? Then the package must be either moved to the top of the program or enclosed in a BEGIN block. Also, a BEGIN block more closely simulates the behavior of a module that has been used, and I find that it helps visually identify an inlined class.

As for Inline::Module, I'll generally avoid modules that have virtually no documentation. However the example from Anonymous Monk clears it up a bit, so maybe it's worth a try.

  • Comment on Re^3: extract all subroutines from .pm's and include in .pl