Andre_br has asked for the wisdom of the Perl Monks concerning the following question:
Iīve been coding Perl for a couple years already, but now I feel itīs time to convert my Perl4-style custom libraries into real .pm modules. The main reason is because Iīm implementing mod_perl and it seems Apache::Reload is only guaranteed to track updates on module-like 'libraries', called with use.
Iīve been through the manpages and also the Camel book, but the OO literature just feeks like Greek to me. Just canīt figure out how to do it! I get lost in the therminology real fast. So I wonder if you guys can give me and applied explanation, say, about how would be a module created after library that looks like this:
The main issues are:[mylibrary1.pl] sub half { my $number = shift; return $number / 2; }
require Exporter; @ISA = qw(Exporter); @EXPORT = qw(half);
I really thank you if you can help me out on this. Sorry if this is too OO-newbie, but I think it may be an interessting material for the community, as I couldnīt find any didatic explanation on this library-module conversion over the web.
Thanks a lot!
Andre
|
|---|