[Kc] Loading files from the current working directory
Teal
ironicface at earthlink.net
Thu May 17 19:40:57 PDT 2012
Is the file being read from the level of the module?
(Where it doesn't exist.)
Teak
> 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
>
>
> _______________________________________________
> kc mailing list
> kc at pm.org
> http://mail.pm.org/mailman/listinfo/kc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kc/attachments/20120517/1eeca4f2/attachment.html>
More information about the kc
mailing list