RE: use Module VERSION; ignoring version???
- From: Bob_Showalter@xxxxxxxxxxxxxxx (Bob Showalter)
- Date: Thu, 25 Aug 2005 16:37:08 -0400
JupiterHost.Net wrote:
> How come "use MODULE VERSION;" works sometimes and not others?
>
> In this case:
>
> $ perl -mstrict -we 'use CGI 3.12;print "$CGI::VERSION\n";'
> CGI version 3.12 required--this is only version 3.11 at -e line 1.
> BEGIN failed--compilation aborted at -e line 1.
> $ perl -mstrict -we 'use File::Copy::Recursive 0.15;print
> "$File::Copy::Recursive::VERSION\n";'
> 0.14
> $
>
> Very odd...
If you look here:
http://search.cpan.org/src/DMUEY/File-Copy-Recursive-0.13/Recursive.pm
You'll see that the author of this module has incorrectly implemented the
VERSION method as:
sub VERSION { $VERSION }
>From perldoc UNIVERSAL:
"VERSION ( [ REQUIRE ] )"
"VERSION" will return the value of the variable $VERSION in the
package the object is blessed into. If "REQUIRE" is given then it
will do a comparison and die if the package version is not
greater
than or equal to "REQUIRE".
"VERSION" can be called as either a class (static) method, an
object method or a function.
You should notify the module author to fix this (by removing his method)
.
- Follow-Ups:
- Re: use Module VERSION; ignoring version???
- From: JupiterHost.Net
- Re: use Module VERSION; ignoring version???
- Prev by Date: use Module VERSION; ignoring version???
- Next by Date: Re: Regular Expression not matching correctly
- Previous by thread: use Module VERSION; ignoring version???
- Next by thread: Re: use Module VERSION; ignoring version???
- Index(es):
Relevant Pages
|