in reply to How's My Style Now?
Maybe you have a reason for it, but nowadays require'ing .pl files looks somewhat antiquated. Libraries should end up as modules to be use()d. You get to choose which subroutines pollute your namespace (via the Exporter module). You have a clean interface (where someone could look at the module and know which subroutines are internal and which are for other modules or scripts to use)
If you really need the comments where a function is from, modules also give you a fitting (explicit) syntax. Instead of
get_general_text('musing_cat',1); # center.plyou could write
center::get_general_text('musing_cat',1);This way the interpreter will correct you if get_general_text were in header.pm instead
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How's My Style Now?
by duelafn (Parson) on Feb 06, 2010 at 15:16 UTC | |
|
Re^2: How's My Style Now?
by Spenser (Friar) on Feb 08, 2010 at 14:46 UTC | |
by Spenser (Friar) on Feb 13, 2010 at 11:43 UTC |