Sifmole has asked for the wisdom of the Perl Monks concerning the following question:
package Foo::Bar; use strict; use Exporter; use vars qw( @ISA @EXPORT_OK ); @ISA = qw(Exporter); @EXPORT_OK = qw(&doSomething); sub new { blah blah blah... } sub dosomething { blah blah blah }
Now in (sample) code I have the following:package Foo::Bar::Blah; use strict; use Foo::Bar qw(doSomething); use vars qw( @ISA ); @ISA = qw(Foo::Bar);
I get the following error:use strict; use Foo::Bar::Blah; Foo::Bar::Blah::doSomething('xyz');
This doSomething() function is intended to be able to be called as either a method of an instance or a straight function call. If I call it like:Use of inherited AUTOLOAD for non-method Foo::Bar::Blah::doSomething() + is deprecated at ./tests/testFooBarBlah.pl ... Can't locate auto/Foo/Bar/Blah/doSomething.al in @INC ...
There is no issue reported, and it appears to function properly.Foo::Bar::doSomething('xyz');
Can anybody shed some light on this?
Note: this is using perl 5.8.2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: AUTOLOAD -- deprecated, in relation to inherited method/function
by Fletch (Bishop) on Jun 29, 2004 at 19:04 UTC | |
|
Re: AUTOLOAD -- deprecated, in relation to inherited method/function
by dragonchild (Archbishop) on Jun 29, 2004 at 18:59 UTC |