in reply to extract all subroutines from .pm's and include in .pl
the Idea of packages is to make the main script look easy and simple and put all the reusable code and subroutines in packages, it seems that you have not understood that properly.
why can't you try exporter and include only those functions you require from those packages, this is one suggestion.
after saying this, another question arises in my mind, after how many subroutines we should look for moving it into a package, 5, 10 .. ?, i am not sure , so far i haven't defined more than two or three sub-routines in the main script, all the other statements are only function calling and flow control, but original functions would be got from modules.
|
|---|
| 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:39 UTC | |
by targetsmart (Curate) on May 18, 2009 at 12:57 UTC |