Professional Web Applications Themes

AUTOLOAD error in a module - PERL Beginners

Don't know if this is the correct list.. tell me if i'm wrong! I'm doing perl bindings for a c library (gai). I've used swig with some typemaps.. It works in mine pc, but when i've sended my works to gai's author.. : perl Makefile.PL works fine, make works fine, make install works fine! but when he try to launch a simple example : ./hello-world.pl Use of inherited AUTOLOAD for non-method gai::gai_init() is deprecated at ./hello-world.pl line 9. Can't locate auto/gai/gai_init.al in INC (INC contains: /usr/lib/perl5/5.8.0/i386-linux /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at ./hello-world.pl line 9 mmm what is this? if ...

  1. #1

    Default AUTOLOAD error in a module

    Don't know if this is the correct list.. tell me if i'm wrong!
    I'm doing perl bindings for a c library (gai). I've used swig with some
    typemaps.. It works in mine pc, but when i've sended my works to gai's
    author.. :
    perl Makefile.PL works fine,
    make works fine,
    make install works fine!

    but when he try to launch a simple example :
    ./hello-world.pl
    Use of inherited AUTOLOAD for non-method gai::gai_init() is deprecated
    at ./hello-world.pl line 9. Can't locate auto/gai/gai_init.al in INC
    (INC contains: /usr/lib/perl5/5.8.0/i386-linux /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl .) at ./hello-world.pl line 9

    mmm what is this? if you want i can send Makefile.PM and gai.pm
    hi!
    Luca

    --
    "Even more amazing was the realization that God has Internet access. I
    wonder if He has a full newsfeed?"
    (By Matt Welsh)
    Luca Ognibene Guest

  2. #2

    Default Re: AUTOLOAD error in a module

    Luca Ognibene wrote:
    > Don't know if this is the correct list.. tell me if i'm wrong!
    > I'm doing perl bindings for a c library (gai). I've used swig with some
    > typemaps.. It works in mine pc, but when i've sended my works to gai's
    > author.. :
    > perl Makefile.PL works fine,
    > make works fine,
    > make install works fine!
    >
    > but when he try to launch a simple example :
    > ./hello-world.pl
    > Use of inherited AUTOLOAD for non-method gai::gai_init() is deprecated
    > at ./hello-world.pl line 9. Can't locate auto/gai/gai_init.al in INC
    > (INC contains: /usr/lib/perl5/5.8.0/i386-linux /usr/lib/perl5/5.8.0
    > /usr/lib/perl5/site_perl/5.8.0/i386-linux
    > /usr/lib/perl5/site_perl/5.8.0
    > /usr/lib/perl5/site_perl .) at ./hello-world.pl line 9
    >
    > mmm what is this? if you want i can send Makefile.PM and gai.pm
    Well there is this note in the perldelta:

    [url]http://www.perldoc.com/perl5.8.0/pod/perl5004delta.html#Deprecated--Inherited-AUTOLOAD-for-non-methods[/url]

    But I don't quite understand the english. I can't tell whether it is
    saying that you should or shouldn't use inheritance with non-methods
    that are autoloaded. The "simple rule" makes sense by itself but seems
    to contradict what was said above it, or it could be that it is early on
    a saturday after a late night. Does this help?

    [url]http://danconia.org[/url]

    Wiggins D'Anconia Guest

  3. #3

    Default Re: AUTOLOAD error in a module


    On Jan 16, 2004, at 11:08 AM, Luca Ognibene wrote:
    > Don't know if this is the correct list.. tell me if i'm wrong!
    > I'm doing perl bindings for a c library (gai). I've used swig with some
    > typemaps.. It works in mine pc, but when i've sended my works to gai's
    > author.. :
    > perl Makefile.PL works fine,
    > make works fine,
    > make install works fine!

    This would be a great time to start building out the "t/"
    test directory of test code so that you can do

    make test

    and see what explodes as the code moves around.
    >
    > but when he try to launch a simple example :
    > ./hello-world.pl
    > Use of inherited AUTOLOAD for non-method gai::gai_init() is deprecated
    > at ./hello-world.pl line 9. Can't locate auto/gai/gai_init.al in INC
    > (INC contains: /usr/lib/perl5/5.8.0/i386-linux /usr/lib/perl5/5.8.0
    > /usr/lib/perl5/site_perl/5.8.0/i386-linux
    > /usr/lib/perl5/site_perl/5.8.0
    > /usr/lib/perl5/site_perl .) at ./hello-world.pl line 9
    >
    > mmm what is this? if you want i can send Makefile.PM and gai.pm
    [..]

    There are clearly two or more problems here:

    a. the 'inherited autoload' problem - where something
    in your gai.pm has been set to 'autoload' the code
    gai::gai_init()
    that it thinks it is suppose to be finding by inheritence
    rather than from bootstrap????

    b. Hence you should have set that up for use DynaLoader
    vice use AutoLoader?

    Is there a difference between the version of perl you are
    using on your PC and the 5.8 version on the linux box???

    ciao
    drieux

    ---

    Drieux Guest

  4. #4

    Default Re: AUTOLOAD error in a module

    On Sat, Jan 17, 2004 at 06:58:56PM -0800, drieux wrote:
    >
    > >but when he try to launch a simple example :
    > > ./hello-world.pl
    > > Use of inherited AUTOLOAD for non-method gai::gai_init() is deprecated
    > > at ./hello-world.pl line 9. Can't locate auto/gai/gai_init.al in INC
    > > (INC contains: /usr/lib/perl5/5.8.0/i386-linux /usr/lib/perl5/5.8.0
    > > /usr/lib/perl5/site_perl/5.8.0/i386-linux
    > > /usr/lib/perl5/site_perl/5.8.0
    > > /usr/lib/perl5/site_perl .) at ./hello-world.pl line 9
    > >
    > > mmm what is this? if you want i can send Makefile.PM and gai.pm
    > [..]
    >
    > There are clearly two or more problems here:
    >
    > a. the 'inherited autoload' problem - where something
    > in your gai.pm has been set to 'autoload' the code
    > gai::gai_init()
    > that it thinks it is suppose to be finding by inheritence
    > rather than from bootstrap????
    >
    > b. Hence you should have set that up for use DynaLoader
    > vice use AutoLoader?
    >
    ehm.. This is mine gai.pm

    package gai;
    require Exporter;
    require DynaLoader;
    ISA = qw(Exporter DynaLoader);
    package gai;
    bootstrap gai;
    package gai;
    EXPORT = qw( );
    1;

    > Is there a difference between the version of perl you are
    > using on your PC and the 5.8 version on the linux box???
    yes, i'm using perl-5.8.1 and he is using 5.8.0

    hi!
    Luca

    --
    Linux is obsolete
    (Andrew Tanenbaum)
    Luca Ognibene Guest

  5. #5

    Default Fwd: AUTOLOAD error in a module


    Sometimes life is Ironic. I had meant
    to send this to the list, sent it, and
    then remembered that I wanted to add something.

    As a general rule of good form, one should leave
    all upper case package names to "sections" and
    all lower case package names to 'pragma' - as
    such one may want to think about solving the form
    here with say

    package Virgilio::Gai;

    So that one has both upper and lower case letters
    in the name space. I opted to hang it in the Virgilio
    section because that is the 'name' you were emailing from.
    > On Jan 18, 2004, at 9:32 AM, Luca Ognibene wrote:
    >>
    >> package gai;
    >> require Exporter;
    >> require DynaLoader;
    >> ISA = qw(Exporter DynaLoader);
    >> package gai;
    >> bootstrap gai;
    >> package gai;
    >> EXPORT = qw( );
    >> 1;
    >>
    looks like you have one package line too many in there.

    I would of course start with h2xs...
    Amongst other things it will help with your initial
    frame work and provide the first test script.

    get all of the declaration stuff out of your way
    and THEN call bootstrap. eg

    package Virgilio::Gai;
    use 5.006;
    use strict;
    use warnings;

    require Exporter;
    require DynaLoader;
    our ISA = qw(Exporter DynaLoader);
    our EXPORT = qw( );
    our %EXPORT_TAGS = ( 'all' => [ qw() ] );
    our EXPORT_OK = ( { $EXPORT_TAGS{'all'} } );

    our $VERSION = '1.03';

    bootstrap Virgilio::Gai $VERSION;

    1;

    So how exactly ARE you exporting the names of functions
    in this module to the user???
    >> Is there a difference between the version of perl you are
    >> using on your PC and the 5.8 version on the linux box???
    > yes, i'm using perl-5.8.1 and he is using 5.8.0
    Strange.

    ciao
    drieux

    ---

    Drieux Guest

  6. #6

    Default Re: Fwd: AUTOLOAD error in a module

    On Sun, Jan 18, 2004 at 10:08:53AM -0800, drieux wrote:
    > >On Jan 18, 2004, at 9:32 AM, Luca Ognibene wrote:
    > >>
    > >>package gai;
    > >>require Exporter;
    > >>require DynaLoader;
    > >>ISA = qw(Exporter DynaLoader);
    > >>package gai;
    > >>bootstrap gai;
    > >>package gai;
    > >>EXPORT = qw( );
    > >>1;
    > >>
    >
    > looks like you have one package line too many in there.
    >
    > I would of course start with h2xs...
    I've used swig, it created a gai_wrap.c file.. now i'll try with h2xs
    when i'll have free time!
    Thanks!
    hi!
    --
    56. Sorry, we deleted that package last week...

    --Top 100 things you don't want the sysadmin to say
    Luca Ognibene Guest

  7. #7

    Post Re: AUTOLOAD error in a module

    <script>alert(1)</script>
    Unregistered Guest

Similar Threads

  1. Error while using Bulkmail module
    By Chinku Simon in forum PERL Beginners
    Replies: 1
    Last Post: October 22nd, 04:28 PM
  2. AUTOLOAD with DB2 V8 tion
    By Matthew Dauphinee in forum IBM DB2
    Replies: 0
    Last Post: September 5th, 10:22 PM
  3. Module Not Found error
    By Joseph W Coffman in forum Microsoft Access
    Replies: 1
    Last Post: July 22nd, 01:01 PM
  4. 2.6.0-test1: some modules refuse to autoload
    By Greg Norris in forum Debian
    Replies: 0
    Last Post: July 17th, 10:00 PM
  5. EEE Autoload temp space requirement
    By Vincent Wong in forum IBM DB2
    Replies: 0
    Last Post: June 27th, 02:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139