Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Perl version number puzzles

by xdg (Monsignor)
on Jun 01, 2009 at 02:40 UTC ( [id://767160] : perlmeditation . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Foo; 
    use strict; 
    use warnings; 
    our $VERSION = 1.23; 
    1;
    
  2. or download this
    $ perl5.10.0 -e 'use Foo 0.001001'
    
    ...
    BEGIN failed--compilation aborted at -e line 1.
    
    $ perl5.8.9 -Mversion -e 'use Foo 0.001001'
    
  3. or download this
    $ perl5.10.0 -e 'use Foo v0.1_1'
    Foo version v0.1_1 required--this is only version v0.0_1 at -e line 1.
    ...
    $ perl5.6.2 -e 'use Foo v0.1_1'
    Foo version 0.011 required--this is only version 0  at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.
    
  4. or download this
    $ perl5.10.0 -e 'use Foo 0.000001'
    Foo version 0.000001 required--this is only version v0.0_1 at -e line 
    +1.
    ...
    $ perl5.6.2 -e 'use Foo v0.0_1'
    Foo version 0.001 required--this is only version v0.0_1  at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.
    
  5. or download this
    $ perl5.10.0 -e 'use Foo v0.1.1'
    
    ...
    $ perl5.8.9 -e 'use Foo v0.2.1'
    Foo version 0.002001 required--this is only version 0.001001 at -e lin
    +e 1.
    BEGIN failed--compilation aborted at -e line 1.