develooper Front page | perl.perl5.porters | Postings from June 2013

Re: [perl #118513] Changed behaviour in UNIVERSAL::can

Thread Previous | Thread Next
From:
David Cantrell
Date:
June 17, 2013 16:42
Subject:
Re: [perl #118513] Changed behaviour in UNIVERSAL::can
Message ID:
20130617164212.GA5437@bytemark.barnyard.co.uk
On Mon, Jun 17, 2013 at 08:25:33AM -0700, Father Chrysostomos via RT wrote:
> On Mon Jun 17 06:38:19 2013, david@cantrell.org.uk wrote:
> > ...
> > As you can see, UNIVERSAL::can("Foo", "can") and Foo->can("can") only
> > return a sub-ref in 5.16.3 if the Foo package has already been seen.
> Not exactly.  It was not consistent:
> 
> $ perl -E'package Foo::Bar; say Foo->can("can")'
> CODE(0x1f4a220)

Eeuuww, that's nasty.

> > Also it appears to be undocumented, including in
> > perldelta.
> 
> It???s this entry:
> 
> =item *
> 
> C<< $class->can >>, C<< $class->isa >>, and C<< $class->DOES >> now return
> correct results, regardless of whether that package referred to by C<$class>
> exists [perl #47113].

Ah, OK, I was searching for the wrong keyword.

> I don???t think there is much we can do about it at this stage.

Fair enough.

-- 
David Cantrell | Official London Perl Mongers Bad Influence

Please stop rolling your Jargon Dice and explain the problem
you are having to me in plain English, using small words.
  -- John Hardin, in the Monastery

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