Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Don’t Repeat Your… version number

by Aristotle (Chancellor)
on Jul 20, 2006 at 23:01 UTC ( #562735=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %const = map  { s/\s+//; $_ }
                map  { split /\s*=>\s*/ }  
    ...
        krunch   => 3
    
    =cut
    
  2. or download this
    $VERSION = ( <<'=cut' =~ /\b\d+\.\d+\b/ );
    
    ...
    This document describes Some::Module 0.1
    
    =cut
    
  3. or download this
    $VERSION = ( <<'=cut' =~ /\b\d+\.\d+\b/ );
    
  4. or download this
    eval "package Some::Module; $_" for grep m/ = /, split /\n/, <<'=cut';
    
    ...
    $VERSION = 0.1
    
    =cut
    
  5. or download this
    $ perldoc ./Some/Module.pm | grep VERSION
           This document describes Some::Module, $VERSION = 0.1
    ...
    $ perl -MExtUtils::MakeMaker \
           -le'print MM->parse_version(shift)' Some/Module.pm
    0.1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://562735]
Approved by Hue-Bond
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-12-29 03:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls