develooper Front page | perl.perl5.porters | Postings from April 2007

Re: [Andreas J. Koenig] C3 MRO breaks Params::Util and Graph

Thread Previous | Thread Next
From:
Joshua ben Jore
Date:
April 23, 2007 23:16
Subject:
Re: [Andreas J. Koenig] C3 MRO breaks Params::Util and Graph
Message ID:
dc5c751d0704232316o11c5154ayc5329e304b27163b@mail.gmail.com
On 4/23/07, Brandon Black <blblack@gmail.com> wrote:
>
> This in turn has lead to another problem.  The "require Scalar::Util"
> in overload.pm breaks ext/Dynaloader/t/Dynaloader.t, because it raises
> some count of loaded xs modules by one during two of the tests.
> Dynaloader itself is fine, its just that the new require line is
> breaking one of its test assumptions, and I didn't see a clean fix for
> that right now, and I'm heading to bed.

Your use of blessed() is dodgy. If you are going to call blessed()
then you should not be treating its return value as a boolean. Only
defined/undefined tells you if your argument is an object or not.
There are two packages in perl which objects may be blessed into that
are also false. Further, once you've gone to the trouble to use
blessed(), you might as well use the value instead of just calling
ref() a couple more times.

Now hold still a second while I bless you for doing this per-package
isa cache stuff (also also slightly curse you for changing this stuff
so my cache-watching code is invalid).

Josh

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About