Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: How to determine absolute path of current Perl file?

by hakonhagland (Scribe)
on Feb 29, 2016 at 10:29 UTC ( [id://1156429]=note: print w/replies, xml ) Need Help??


in reply to Re: How to determine absolute path of current Perl file?
in thread How to determine absolute path of current Perl file?

Hi Discipulus! Thanks for your reply. My understanding is that Cwd::abs_path() uses the current directory, but that directory may not be equal to the initial current directory (for example if the user has called chdir). Regarding Module::Path, yes it could work.. but not all perl files are modules, for example the main script ./test/test.pl. Also I think there is no reason to cycle all the @INC directories for the given module, when it always (if the path is relative) will be under (that is, relative to) the initial current directory.

Log In?
Username:
Password:

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

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

    No recent polls found