Front page | perl.perl5.porters |
Postings from August 2010
From: Steffen Mueller
August 31, 2010 04:41
Message ID: 4C7CEA43.firstname.lastname@example.org
David Cantrell wrote:
> It's not as if:
> * 'use lib' happens a lot, so the performance hit is unimportant;
> * users have complained about having to use Scalar::Util
> and wouldn't complain about having to 'use mauve' instead
I'm sorry to be blunt, but you're missing the point.
a) "use lib" may happen before loading Scalar::Util. I.e. you might want
to pick up an S::U from ==> "over there" instead of the core one. You
know. An updated one from CPAN in your private library. This isn't
entirely bonkers. We want lib.pm to be slim. More so when it comes to
loading extra XS.
b) You don't "use mauve". You just say "mauve::refaddr()".
The idea in the context (and see my recent mail for my current opinion
on it) is that you have something like "scalar::refaddr" as a builtin
feature. The namespace simply serves as a way to prevent clashes with
user functions (and also some grouping of related functions).
The reason "mauve" isn't "Scalar::Util" is simply because the "mauve"
functions aren't doing the same thing.