develooper Front page | perl.perl5.porters | Postings from December 2015

Re: Proposal: Add {-as => 'new_name'} feature to

Thread Previous | Thread Next
December 18, 2015 01:30
Re: Proposal: Add {-as => 'new_name'} feature to
Message ID:
On 18 December 2015 at 01:58, Chad Granum <> wrote:
> I have no objections to using reftype, except that it returns undef on
> non-refs which makes the conditional more complicated.

Yes, its true that reftype() has a frustrating interface. I tried to
change  that in the mauve patch. But it got bikeshedded to death.

> Also I would be
> pretty surprised if someone passed in a blessed ref to change the name of a
> sub.. Perhaps it should just document that it doesn't work with a blessed
> ref?

Personally I hate that distinction. If someone wants to pass you a
blessed hashref where you have asked for a hashref why should you


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About