Exporting functions by attributes
publiustemp-londonpm at yahoo.com
Fri Oct 12 08:27:29 BST 2007
--- Matt S Trout <dbix-class at trout.me.uk> wrote:
> > For the record, Exporter::Simple does what I had in mind - you can
> > 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
> else I've found.
Bonus: no inheritance required. If I have to deal with one more
module which forces me to inherit just because the author thought it
was a good idea, I'm going to go insane.
So, let's say I need a factory class, with class data, don't want to
worry about missing methods and want handy method generation.
Where's the bug?
# Hmm, better sort these so they're easy to read ...
use base qw(
Buy the book - http://www.oreilly.com/catalog/perlhks/
Perl and CGI - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/
More information about the london.pm