Problem with using AutoLoader Module.

A

Augustus Fernandis

I am using perl 5.003 on solaris 8.0.

Here is my problem.
I am trying to use AutoLoader functionality in one of my modules.

I have put
use AutoLoader 'AUTOLOAD' ;

and my functions (e.g. testProc) after __END__ in my module file.

I generated the module by h2xs -Xn myModule
then edited the myModule/myModule.pm with the the data above.

After than perl Makefile.pl PREFIX=$HOME/myPerlModules

After that "make install", which installs the module in $HOME/myPerlModules.
It also creates the auto/myModules dir with the necessary files under
$HOME/myPerlModules.

Now in my script I do

use lib '/home/user/myPerlModules' ;
use AutoLoader 'AUTOLOAD' ;
testProc("123");

I get the message
Can't localte auto/main/testProc.al in @INC ....

My question is , why is it looking for auto/main instead of auto/testProc ?
I also tried myModule::testProc , but I get can't locate
myModule/testProc.pm

I also tried
use myModule 'testProc' ; But I get testProc is not exported. I haven't
added testProc to @EXPORT or @EXPORT_OK, but I thought with AutoLoader it
is not needed.

So what am I missing here ? any help greatly appriciated .
 
J

Joe Smith

Augustus said:
I am using perl 5.003 on solaris 8.0.

That's too old.
Try it with version 5.8.5, then post any further questions
to comp.lang.perl.misc (and not comp.lang.perl).
-Joe
 
A

Augustus

Joe said:
That's too old.
Try it with version 5.8.5, then post any further questions
to comp.lang.perl.misc (and not comp.lang.perl).
-Joe

Sorry it's actually 5.005 , I also tried with 5.8 on linux
same error.
I have posted on comp.lang.perl.misc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top