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

GrandFather, thanks for your answer. cava packager sounds like overkill for my problem.

my idea to extract single subroutines from packages seemed simple for packages that are merly collections of independend routines but gets difficult for e.g. OO code. therefor it's seems to be against the nature of code architecture where packages are independend units.

i'll think it over;)

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

Replies are listed 'Best First'.
Re^3: extract all subroutines from .pm's and include in .pl
by bart (Canon) on May 18, 2009 at 18:56 UTC
    my idea to extract single subroutines from packages seemed simple for packages that are merely collections of independent routines but gets difficult for e.g. OO code.
    You're wrong there. In Perl, the module source file and the package name are often the same (after conversion) due to convention, but it doesn't have to be that way. You can easily stuff more packages in a single module file, or even in your main script.

    That works particularly well for OO code, because in OO code you usually don't import anything from the package. And it's precisely the latter that can make things more tricky.