Exporting functions by attributes

Matt S Trout dbix-class at trout.me.uk
Thu Oct 11 21:10:41 BST 2007


On Tue, Oct 09, 2007 at 02:59:07PM +1000, Toby Corkindale wrote:
> It occurred to me earlier that exporting functions from modules in the
> traditional way, ie. as given in `perldoc Exporter`, seems poor,
> especially with the availability of function attributes in recent
> versions of Perl.
> 
> I had a search around on CPAN, and found that there are already at least
> seven different Exporter variants - Classic, Easy, Easiest, Lite,
> NoWork, Simple and Tidy. (There are probably more, but I stopped looking
> at this point).
> 
> For the record, Exporter::Simple does what I had in mind - you can tag
> functions with attributes Exported or Exportable (exported by default or
> optionally). More info in their docs.

I'd just suck it up and use Sub::Exporter, which is much nicer than anything
else I've found.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/


More information about the london.pm mailing list