Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Why eval $version?

by choroba (Cardinal)
on Jul 09, 2020 at 15:59 UTC ( [id://11119093]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why eval $version?
in thread Why eval $version?

The problem is that $Foo::VERSION is still 1.01_01, the underscore included.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^4: Why eval $version?
by hippo (Bishop) on Jul 09, 2020 at 16:10 UTC

    Yes, the underscore is still there. Why is that a problem?

      Often, users will take the version from Module->VERSION or $Module::VERSION and compare it to a number. This will issue a warning:

      package Module;
      our $VERSION = "1.1_2";
      my $new = Module->VERSION > 1.1;
      

      Also, for modules that want to work properly on perls older than 5.10, leaving an underscore in the $VERSION will result in a use call throwing a warning.

      > Yes, the underscore is still there. Why is that a problem?

      because a dev version will show on CPAN as a new release?

      update

      I dunno

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119093]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 02:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found