Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Problem with using AutoLoader Module.

Reply
Thread Tools

Problem with using AutoLoader Module.

 
 
Augustus Fernandis
Guest
Posts: n/a
 
      11-13-2004
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 .
 
Reply With Quote
 
 
 
 
Joe Smith
Guest
Posts: n/a
 
      11-14-2004
Augustus Fernandis wrote:

> 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
 
Reply With Quote
 
 
 
 
Augustus
Guest
Posts: n/a
 
      11-15-2004
Joe Smith wrote:

> Augustus Fernandis wrote:
>
>> 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


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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Optionally avoid AutoLoader Marc Girod Perl Misc 11 04-24-2012 02:39 PM
[ANN] autoloader, version 0.0.2 David Masover Ruby 7 11-25-2009 05:36 PM
Problems with using Autoloader Brian McCauley Perl Misc 1 11-15-2004 05:17 AM
[Fwd: perl AUTOLOADER vs c++] Billy N. Patton C++ 1 10-15-2004 10:45 PM
Can't locate package AutoLoader for @File::List::ISA at... Shahriar Perl Misc 3 06-19-2004 05:22 AM



Advertisments