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:
Kent Fredric
Date:
December 19, 2015 03:29
Subject:
Re: Proposal: Add {-as => 'new_name'} feature to Exporter.pm
Message ID:
CAATnKFC5VjPw46fFSYVSpkSZ+D+ugJLfP7pO70X=0dGM6YWUCw@mail.gmail.com
On 19 December 2015 at 15:56, David Golden <xdg@xdg.me> wrote:
> (3)  Assume a newer Exporter 3.1415 with the -as feature, how would (2b)
> outcomes change (i.e. still no use of Exporter::* from CPAN)
>
>   (3a) Author adds dependency on new Exporter 3.1415; my problem is solved
>   (3b) Author doesn't want to depend on newer Exporter, citing desire not to
> add a dependency for older Perls; I am still stuck

I was under the impression that as-is, in case 3b, you're not "stuck",
because the feature is available whether or not that module does
anything.

You're just stuck in a dependency declaration place, which is one of
the worst places to be stuck, because its hard to tell you have a
problem there when you have it ( Due to things magically just working
as long as the combination is installed )


And you're additionally stuck because its hard to tell somebody "you
need a newer dependency to satisfy what I'm doing", even though they
don't need to.

For instance, say you want to use the -as syntax on an imaginary
module that is popular, but non-core, and has a 5.6 compatibility
agenda.

You can use that module without changing, just by upgrading Exporter.

And if you ask that module to fix your dependency problem by requiring
a newer Exporter, you're just going to get a "No".

And all the other users of that module who don't need the '-as' syntax
will not be very impressed with needing to install a newer Exporter.pm
on an older perl for everything they install, even though there might
be no code on their system that uses the -as syntax.



-- 
Kent

KENTNL - https://metacpan.org/author/KENTNL

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