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

Re: A more CPANish way of making the prereq explicit? [was:Proposal: Add {-as => 'new_name'} feature to]

Thread Previous
Chad Granum
December 24, 2015 14:49
Re: A more CPANish way of making the prereq explicit? [was:Proposal: Add {-as => 'new_name'} feature to]
Message ID:
1) Symbol::Rename is an experiment to scratch an itch. It should not be
considered a finished product, or stable code. MST and others have already
given me feedback that is likely to produce significant changes to the
module, least of which is a name change.

2) Even if Symbol::Rename is eventually a viable thing, it does not take
away the usefulness of adding the renaming feature to

On Thu, Dec 24, 2015 at 1:20 AM, Kent Fredric <> wrote:

> On 24 December 2015 at 21:48, Aristotle Pagaltzis <>
> wrote:
> > That said I do not love the name and welcome
> >> bike-shedding for a better one.
> I think Chads' other experiment,
> , is an appreciable compromise
> that doesn't require gut poking.
> Its essentially a nicer syntax for  doing
> use Foo ":group";
> BEGIN { *newname = *oldname; undef *oldname }
> Except without needing arcane understanding of what that's doing that
> confuses novices.
> use Foo ":group"
> use Symbol::Rename "oldname" => "newname";
> I think the only downside of this approach is it leaves very few open
> doors for a potential future that tracks imported symbols
> such that "no Foo" will clean itself up.
> At least with bolting it in exporter, exporter could potentially
> record a map of who it gave what symbols to so that it could nuke them
> again when its done.
> Then again, everyone uses namespace::autoclean anyway.
> --
> Kent

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