Problem with using AutoLoader Module.

Discussion in 'Perl' started by Augustus Fernandis, Nov 13, 2004.

  1. 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 .
    Augustus Fernandis, Nov 13, 2004
    #1
    1. Advertising

  2. Augustus Fernandis

    Joe Smith Guest

    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
    Joe Smith, Nov 14, 2004
    #2
    1. Advertising

  3. Augustus Fernandis

    Augustus Guest

    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
    Augustus, Nov 15, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Billy N. Patton

    [Fwd: perl AUTOLOADER vs c++]

    Billy N. Patton, Oct 15, 2004, in forum: C++
    Replies:
    1
    Views:
    404
    David Hilsee
    Oct 15, 2004
  2. David Masover

    [ANN] autoloader, version 0.0.2

    David Masover, Nov 24, 2009, in forum: Ruby
    Replies:
    7
    Views:
    200
    Robert Klemme
    Nov 25, 2009
  3. Shahriar
    Replies:
    3
    Views:
    186
  4. Brian McCauley

    Problems with using Autoloader

    Brian McCauley, Nov 14, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    94
    Augustus
    Nov 15, 2004
  5. Marc Girod

    Optionally avoid AutoLoader

    Marc Girod, Apr 21, 2012, in forum: Perl Misc
    Replies:
    11
    Views:
    752
    Marc Girod
    Apr 24, 2012
Loading...

Share This Page