Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Class::Accessor has the advantage that it doesn't abuse import() to do something other than importing just to get a more compact syntax.
    • Does it matter?

      In fact, since O::T creates accessors with the given names, it’s arguable whether it’s even abuse in the first place.

      • I find it unnecessarily confusing to use import for non-importing tasks. It's usually done only as syntactic sugar, not because it actually needs to happen at that stage. It's not a huge problem, but I appreciate the fact that modules like Test::More let's me use a more traditional alternative syntax.
        • What about pragmas, like strict? use strict qw(refs); Would you prefer use strict; BEGIN { strict->enable(qw(refs)) } Imports seem like a general way to parameterize the use of a module. The historical choice of the name import() shouldn't necessarily be taken as a permanent restriction on usage.