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

It may be that you are looking for Cava Packager? It goes a step or two further and can generate an installer for a complete install of a Perl script and the environment it needs (including the perl interpreter) as a stand alone application.


True laziness is hard work
  • Comment on Re: extract all subroutines from .pm's and include in .pl

Replies are listed 'Best First'.
Re^2: extract all subroutines from .pm's and include in .pl
by meyerti (Novice) on May 18, 2009 at 12:47 UTC
    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;)

      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.