Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

require latest module version

by tenya (Beadle)
on Apr 15, 2003 at 05:01 UTC ( [id://250475]=perlquestion: print w/replies, xml ) Need Help??

tenya has asked for the wisdom of the Perl Monks concerning the following question:

I have written several modules and put them in the same directory as my program, and I want my program to only use my latest module versions. From Perldoc it seemed that
use MYMOD 1.3 'my_sub';
would require $VERSION 1.3, but it still accepts $VERSION 1.2. How do I get my program to croak unless it finds 1.3?

Replies are listed 'Best First'.
Re: require latest module version
by PodMaster (Abbot) on Apr 15, 2003 at 05:23 UTC
    Try
    use MYMOD 1.3; use MYMOD 'my_sub';
    Kindly read `perldoc -f use' so you can understand what use does. Also, only might be of interest to you.

    The most likely reason the version check magick is not working is because MYMOD does not inherit it's import method from EXPORTER.


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
    ** The Third rule of perl club is a statement of fact: pod is sexy.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-29 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found