Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Finding files relative to a module

by Khen1950fx (Canon)
on May 15, 2011 at 04:33 UTC ( #904911=note: print w/ replies, xml ) Need Help??


in reply to Finding files relative to a module

I tried it with if ! instead of unless. Worked.

package Chess::PGN::EPD; use strict; use warnings; use Chess::PGN::Moves; use File::Spec::Functions; use Storable qw( retrieve ); use Cwd qw( realpath ); use Try::Tiny qw( try catch ); require Exporter; my ( $hECO, $hNIC, $hOpening ); my (%hash) = ( ECO => \$hECO, NIC => \$hNIC, Opening => \$hOpening ); my $db_dir_qfn = realpath( catfile( __PACKAGE__, updir(), 'db' )); if ( -d !$db_dir_qfn ) { $db_dir_qfn = realpath('db'); }


Comment on Re: Finding files relative to a module
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2015-07-30 14:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls