develooper Front page | perl.perl5.porters | Postings from January 2016

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

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
January 25, 2016 11:36
Subject:
Re: Proposal: Add {-as => 'new_name'} feature to Exporter.pm
Message ID:
20160125113547.GA70221@plasmasturm.org
* Chad Granum <exodist7@gmail.com> [2016-01-24 07:15]:
> Related:
>
> http://blogs.perl.org/users/chad_exodist_granum/2016/01/the-problem-with-exporters-meet-importer.html
>
> This blog post was spawned by this thread, and some very good thing
> people introduced into the discussion.
>
> Part 1 is up on cpan (Importer.pm).
>
> I do not have a formal patch made from Part2, but the commit is on my
> github clone of the perl repo. I am mainly posting this here to gauge
> opinion and seek feedback.

I don’t think turning every `use Foo ...` into `use Importer Foo => ...`
constitutes an improvement of the code.

There is indeed a failure to separate concerns in Perl’s standard way of
doing things, but going from “every module picks some exporter and its
user gets no choice” to “every module cooperates with Importer and its
user gets no choice” isn’t particularly much of a gain.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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