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

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

Thread Previous | Thread Next
From:
demerphq
Date:
December 18, 2015 01:30
Subject:
Re: Proposal: Add {-as => 'new_name'} feature to Exporter.pm
Message ID:
CANgJU+Xko+rTv2dUPc51N6vN16O+3cvVj7ZUbimf2d+0wZv7FQ@mail.gmail.com
On 18 December 2015 at 01:58, Chad Granum <exodist7@gmail.com> 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
care?

Yves

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