[Kc] Loading files from the current working directory

Luke Patterson lukewpatterson at gmail.com
Thu May 17 19:35:05 PDT 2012


I'm having troubles loading files from the current working directory.

e.g.
running this:
    use Parse::CPAN::Meta;
    my $distmeta = Parse::CPAN::Meta->load_file('META.json');
yields:
    "can't open META.json for reading: No such file or directory at
/home/vagrant/perlbrew/perls/perl-5.14.2/lib/5.14.2/Parse/CPAN/Meta.pm line
87."

even though the file is indeed in the same directory as the script and the
same directory from which I launch the script

I verified that the current working directory is correct by running:
    use Cwd;
    my $dir = cwd();
    print $dir
which yields the correct working directory


I've tried passing simple file names and fully-qualified files names with
path but neither seems to work.  It doesn't seem to be just that API call
shown above, a couple others API calls I've tried don't seem to work either.

I must be missing something basic.  Ideas?


Thanks,
Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kc/attachments/20120517/6ec1c7ca/attachment.html>


More information about the kc mailing list