Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Cwd::abs_path or FindBin::Bin?

by ikegami (Patriarch)
on Jun 08, 2019 at 10:32 UTC ( [id://11101122]=note: print w/replies, xml ) Need Help??


in reply to Cwd::abs_path or FindBin::Bin?

use FindBin qw( $RealBin ); use lib "$RealBin/../lib";
is basically equivalent to
use Cwd qw( abs_path ); use File::Basename qw( dirname ); use lib dirname(abs_path($0)) . "/../lib";

(I don't know if the latter works on VMS.)


Note that you should always use $RealBin. Using $Bin will cause your program to break if it's run via a symlink.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-26 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found