develooper Front page | perl.perl5.porters | Postings from February 2018

[perl #132902] Blead Breaks CPAN: Class::Std

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
February 25, 2018 18:48
Subject:
[perl #132902] Blead Breaks CPAN: Class::Std
Message ID:
rt-4.0.24-2646-1519584499-1027.132902-15-0@perl.org
On Sat, 24 Feb 2018 22:24:01 -0800, sprout wrote:
> On Sat, 24 Feb 2018 18:42:22 -0800, demerphq wrote:
> > (05:57:51) Zefram: annoyingly, the exact thing you want is available
> > as a Perl op, method_named, but you can't get at that op in isolation
> > through Perl source code
> 
> It already exists.  It is called UNIVERSAL::can (which we can use,
> since we control it; even though it was designed for methods, it
> happens to work for this case).  Unfortunately, there are (buggy) CPAN
> modules that diddle with it.  Fortunately, Carp already has (partial)
> code to detect whether that has happened.
> 
> (Note: There is a comment in overload.pm about ‘real’ can() leaving
> stubs.  I think we need to get to the bottom of that before trying
> UNIVERSAL::can.  Leaving a "()" stub behind may break things, since
> that’s where the fallback value is stored.)

Never mind that note.  Since overload::Overloaded used to call ->can, it obviously doesn’t matter for this case.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=132902

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