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

[perl #113932] UNIVERSAL::can should support globrefs

Thread Previous
From:
Father Chrysostomos via RT
Date:
July 7, 2013 05:30
Subject:
[perl #113932] UNIVERSAL::can should support globrefs
Message ID:
rt-3.6.HEAD-2552-1373175021-1812.113932-15-0@perl.org
On Mon Jul 23 20:02:18 2012, perl.p5p@rjbs.manxome.org wrote:
> * Father Chrysostomos <perlbug-followup@perl.org> [2012-07-01T17:32:22]
> > That it should support globrefs is unquestionable.
> 
> I hate not taking a challenge like that, but I agree. :-)
> 
> > But, in addition to \*ARGV, should UNIVERSAL::can(...) accept *ARGV?
 And
> > should it treat "ARGV" as \*ARGV?
> 
> I believe the answer to both of those is "yes."  Who disagrees?

I think I might. :-)

If someone has a package named FOO and a file handle named FOO, then
"FOO"->turn will turn the handle, but UNIVERSAL::can("FOO",
"unwrap")->("FOO") will unwrap the package.  Is that a bug, or an
available workaround?

-- 

Father Chrysostomos


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

Thread Previous


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