[Kc] Loading files from the current working directory

Jason Rush jason+kcpm at jlrush.com
Thu May 17 22:24:54 PDT 2012


>
> > 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."
>

I recreated the package methods used to read the file and it worked for me.
 If it was a permission problem, the error would state that, e.g.
'Permission denied...'

A few suggestions, not trying to talk down, so please don't take offense,
but you may need to make sure the filename on the system matches exactly
what you use in the script including case.  Also, you may want to verify
that there are no whitespace characters hidden in either the filename on
the system or in the perl script.

For example, note the added space in the filename when it is created:
$ echo 'Hello World' >'input.txt '
$ ls -al
total 40
drwxr-xr-x  3 jrush  jrush  512 May 18 00:05 .
drwxr-xr-x  9 jrush  jrush  512 May 17 23:45 ..
-rw-r--r--  1 jrush  jrush   12 May 18 00:07 input.txt
drwxr-xr-x  3 jrush  jrush  512 May 17 23:45 lib
-rw-r--r--  1 jrush  jrush  218 May 18 00:07 test.pl
$ perl test.pl
can't open input.txt for reading: No such file or directory at
lib/JLR/File/Reader.pm line 10.

Hope that helps.

Jason Rush
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kc/attachments/20120518/48fbcfb0/attachment.html>


More information about the kc mailing list