Skip Menu |

This queue is for tickets about the Exporter-Tiny CPAN distribution.

Report information
The Basics
Id: 123141
Status: rejected
Priority: 0/
Queue: Exporter-Tiny

People
Owner: Nobody in particular
Requestors: REHSACK [...] cpan.org
Cc: HERMES [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.000000
Fixed in: (no value)



CC: HERMES [...] cpan.org
Subject: VERSION check missing
Hi Toby, In modules using Exporter, ensuring a particular version is easy: $ perl -MDBI=1.630 -e1 $ perl -MDBI=99 -e1 DBI version 99 required--this is only version 1.636 at /Users/sno/perl5/perlbrew/perls/perl-5.24.1/lib/5.24.1/Exporter/Heavy.pm line 125. But Exporter::Tiny doesn't recognize this as a version approval (which is very common in Perl world): $ perl -MList::MoreUtils=99 -e1 Would you consider this as a missing feature or (since it should be a drop-in replacement for Exporter) as a design bug? Cheers, Jens
I think this is a misfeature in Exporter that shouldn't be carried over. In normal perl syntax, a version check would be done like: use DBI 1.630; What you are showing is the equivalent of: use DBI '1.630'; I don't think this is a good thing to encourage. It will be silently ignored by any module that doesn't use Exporter, where the bare version form will work with any module specifying a $VERSION.
Cool - good to know. I've seen the use of this feature by one of the famous Perl people (I don't remember who it was - maybe in a video from a Perl Conference). In that case, a small sidenote should be added explaining that. Maybe in manual... Toby, I happily send you a PR based on Graham explanation if you want.
I guess I'd accept a documentation patch, provided it's small and unobtrusive. FWIW, you can do this: perl -M'List::MoreUtils 99'