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.
  • Why does this need an entire module?

    use constant Customer => 'My::Company::Namespace::Customer';
    use constant Preferred => 'My::Company::Namespace::Preferred::Customer';

    my $cust = Customer->new;
    my $pref = Preferred->new;

    I've used this… not-even-a-trick on several occasions, FWIW.

    Note how it makes no difference in the actual code, just makes effective use of what's already in the core. (And you could even do without using prototyped subs, but that is too opaque for my taste.)