Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Finding files relative to a module

by GrandFather (Cardinal)
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 romping around the Monastery: (10)
As of 2014-12-18 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (66 votes), past polls