in reply to Creating module files from subroutines
. It's not as elegant as modules and it's not particularly mod_perl friendly, but it works and is imho quicker to implement. (It is true that global variables in the two files are accessible to each other with this approach, not encapsulated and filtered through well-defined EXPORT interfaces, but you may or may not care about that depending on how your code works.) Perhaps some more experienced monk will tell you (and me) why not to do it this simple way.BEGIN { require "/var/www/cgi-bin/snmplib.pl"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re (tilly) 2: Simpler alternative to modules
by tilly (Archbishop) on Apr 17, 2001 at 21:03 UTC |