Perl 5.004_04 built for sun4-solaris - object oriented programming calls
Posted on 2003-03-10
Do they work?
I'm trying to run this script which should print a single line to the browser:
print "Content-type: text/html\n\n";
$x=File::Spec->catfile('a', 'b', 'c');
print "File::Spec->catfile('a', 'b', 'c') = $x";
but it simply fails with a
[Mon Mar 10 15:09:10 2003] Can't locate object method "catfile" via package
"File::Spec" at form.cgi line 4.
This message appears whenever I try and use certain modules and no matter
what method is being called within the module.
Any clues as to where I'm going wrong? ...
P.S. I'm developing on a system which I have no access to bar the cgi-bin. It's some kind of a custom build, I think because it doesn't appear to have some of the default modules - CGI.pm works fine but File::Spec does not, even tho I *think* that was bundled with this version of perl as default. I have tried adding a File directory to my cgi-bin and putting all the associated Spec.pm and files in the Spec dir inside there. This lets the script find the files but causes the error above.