Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Finding files relative to a module

by GrandFather (Sage)
on May 15, 2011 at 05:38 UTC ( #904918=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $modulePath = $INC{'Chess/PGN/EPD.pm'};
    
  2. or download this
    ...
    use File::Spec::Functions qw(rel2abs splitpath updir catdir);
    ...
    my $loadPath   = rel2abs ($INC{'Chess/PGN/EPD.pm'});
    my @parts      = splitpath ($loadPath);
    my $db_dir_qfn = realpath (catdir (@parts[0, 1], updir(), 'db'));
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-08-28 05:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (334 votes), past polls