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) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
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 --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
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: http://www.perldoc.com/perl5.8.0/pod/perl5004delta.html#Deprecated--Inherited-AUTOLOAD-for-non-methods 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? http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
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 --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
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) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response