Ahh, well if that's the case, then this is in fact a documentation
"bug", rather than a code bug: the POD doesn't advertise that blessed
() would be exported by default, so it was unexpected on my part.
I have to say though that (at least to me) Scalar::Utils::blessed()
is so oft-used (along with reftype()) that I often forget they're not
part of CORE perl. I suppose it's too late the remedy that (assuming
folks have written code to depend on your blessed().)
So, can you add EXPORTS to your documentation? Future consumers of
your module will silently thank you. :)
Thanks,
David
On Jun 22, 2007, at 18.10 , via RT wrote:
Show quoted text>
> <URL:
http://rt.cpan.org/Ticket/Display.html?id=27699 >
>
> Thanks for the feedback. I do not consider this a bug, annoying maybe
> but not a bug. Both modules have a function called blessed(). These
> functions are related but completely different. You, the user, have
> control over which (if any) gets imported into your package. This
> is no
> different to any other 2 clashing exported symbols. You can just as
> easily say "Workaround is to simply not import anything from
> Scalar::Util."
>
> Perhaps "blessed" was a bad choice - although I don't really think so
> and I can't think of a better one. Either way, changing anything now
> would break a lot of existing code for almost no benefit.
>
> Let me know if you find any other problems (I don't close
> everything as
> "NOT A BUG" :)
>
> F
>
> On Fri Jun 22 15:11:26 2007, DPISONI wrote:
>> If you import all from Test::Deep, it exports its own blessed()
>> function that conflicts with
>> Scalar::Util. Here's the warning:
>>
>> dpisoni@szdpisoni-mpb15:~$ perl
>> use Scalar::Util qw/blessed/;
>> use Test::Deep;
>> Prototype mismatch: sub main::blessed ($) vs none at
>> /System/Library/Perl/5.8.6/Exporter.pm
>> line 65.
>> at - line 2
>>
>> Workaround is to simply not import anything from Test::Deep.
>> Regardless, this should be
>> considered a bug.
>>
>> (This was demonstrated with perl v5.8.6.)
>>
>
>
>