Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Note: I didn't write this post to start a flame war or to discredit anyone. What i like to see is some active discussion on the topic

On most of my (linux) systems, i usually have at least two perl binaries installed:

  • Whatever comes with the linux distribution, usually at /usr/bin/perl
  • The one that i use. That's the one a call to "perl" starts in *my* user account

In the past - when using the OS supplied perl - i had some major troubles. Mostly, these where incompatibilities after the distributor rolled out some updates or when i upgraded some modules to newer (test) versions. Also, now i use ActiveState Perl for much of my software development.

The trouble is: While the distribution-supplied scripts correctly call /usr/bin/perl, most of the code that i download from the interwebs does so too - and start breaking because of "missing" modules

The thing that worked for me best is to change all Perl scripts on my system to use
#!/usr/bin/env perl
as the hashbang line. Whenever the systems automatically start a Perl script, it uses the dristribution-maintained perl, whenever i start a script with my user account, it uses the perl installed in my home directory.

In my opinion, in a time where there are more and more different plattforms, assuming perl is at a fixed path and that perl binary is the correct one to use isn't very helpfull. It's similar to the still widely spread believe that /bin/sh is bash (or csh or whatever)...


In reply to Calling the correct perl binary by cavac

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 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?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-29 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found