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

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
> Unfortunately, when compiling Perl with the otherlibdirs option (to include additional locations), it adds the new locations to the end of @INC.

Prepending the locations to @INC wouldn't help, as the RTB folks wouldn't be able to load the old version anymore. When searching for a module, Perl checks the version only when it finds the first implementation. If the version is less than the one specified, Perl dies, it doesn't look for a different version in the rest of the paths.

$ cat My.pm package My; our $VERSION = "1"; warn "1 loaded"; 1; $ cat 0/My.pm package My; our $VERSION = "2"; warn "2 loaded"; 1; $ perl -I. -I0 -e 'use My 1; warn $My::VERSION;' 1 loaded at My.pm line 2. 1 at -e line 1. $ perl -I0 -I. -e 'use My 1; warn $My::VERSION;' 2 loaded at 0/My.pm line 2. 2 at -e line 1. $ perl -I. -I0 -e 'use My 2; warn $My::VERSION;' 1 loaded at My.pm line 2. My version 2 required--this is only version 1 at -e line 1. BEGIN failed--compilation aborted at -e line 1. $?=255 $ perl -I0 -I. -e 'use My 2; warn $My::VERSION;' 2 loaded at 0/My.pm line 2. 2 at -e line 1. $ perl -I0 -I. -e 'use My 1; warn $My::VERSION;' 2 loaded at 0/My.pm line 2. 2 at -e line 1.

But, interestingly

$ perl -I. -I0 -e 'eval q{use My 2}; warn $My::VERSION;' 1 loaded at My.pm line 2. 1 at -e line 1.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

In reply to Re^3: how to improve: use MODULE VERSION LIST by choroba
in thread how to improve: use MODULE VERSION LIST by smile4me

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2021-07-27 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?