Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Installing a newer version of a module without replacing the existing one.

by salvadors (Pilgrim)
on Jan 18, 2001 at 00:05 UTC ( [id://52587]=note: print w/replies, xml ) Need Help??


in reply to Re: Installing a newer version of a module without replacing the existing one.
in thread Installing a newer version of a module without replacing the existing one.

how about in Perl 6 being able to use require or a variant of use to be able to specify which of two versions of a given module you have to use in the script.

This already exists in Perl 5.

perldoc -f use

=item use Module VERSION LIST If the VERSION argument is present between Module and LIST, then the C<use> will call the VERSION method in class Module with the given version as an argument. The default VERSION method, inherited from the Universal class, croaks if the given version is larger than the value of the variable C<$Module::VERSION>. (Note that there is not a comma after VERSION!)

Tony

  • Comment on Re: Re: Installing a newer version of a module without replacing the existing one.
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Installing a newer version of a module without replacing the existing one.
by chipmunk (Parson) on Jan 18, 2001 at 00:39 UTC
    The VERSION argument does not specify which version of a module to use, from multiple installed versions. Rather, as this snippet of documentation states: after the module has been loaded (which will be the first occurence of the module in @INC, regardless of VERSION), Perl will die if $Module::VERSION is less than the VERSION argument.

    This is just like putting require 5.005; in your Perl script. It won't change which perl executable is used to run your script; it will simply die if the executable used isn't a recent enough version.

(tye)Re: Installing a newer version of a module without replacing the existing one.
by tye (Sage) on Jan 18, 2001 at 00:38 UTC

    No, that checks whether you got as new of a version as you requested. It does not let you pick between multiple versions that are installed.

            - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-24 00:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found