On Wednesday 19 August 2009 16:03:01 Peter Scott wrote: > On Tue, 18 Aug 2009 19:39:29 -0400, Steve Bertrand wrote: > > While reviewing my POD to ensure that I've been keeping it up-to-date > > properly, and so that I can still easily understand the API at the > > documentation level, I've noticed that two of my modules have > > subroutines that only perform global tasks, and don't need to be > > object-oriented at all. > > > > Is it recommended that I stick with the overall style of the project by > > making all of the modules object-oriented, or is it better to create > > procedural modules when objects are not required? > > No, you can mix it up. > > Consider whether a subclass might have a reason to override any of these > global procedures. If you can postulate a rationale for that, they should > be class methods. > > The Exporter isn't hard to learn, and Exporter::Simple is even easier and > prettier. Non O-O procedures should be exported.
Just for completeness sake, one should note that there's also Sub::Exporter: http://search.cpan.org/dist/Sub-Exporter/ The POD page has comparisons with other exporters. Here's a presentation about Sub-Exporter: http://www.slideshare.net/rjbs/crafting-custom-interfaces-with-subexporter Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ First stop for Perl beginners - http://perl-begin.org/ God gave us two eyes and ten fingers so we will type five times as much as we read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/