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.