ehdonhon has asked for the wisdom of the Perl Monks concerning the following question:
I'm having trouble geting an object I have written to do what I want with the AutoLoader module. I have created a new perl module with h2xs -X and have written a number of functions. Whenever I make && make install the module, I can use it and call my object contructor's new method via my $obj = new PackageName without any problems. However, when I modify my code so it includes the following:
The code still compiles, but I have errors when I try to call the constructor method:use AutoLoader; ## Not importing AUTOLOAD method. sub AUTOLOAD { goto &AutoLoader::AUTOLOAD; }
Can't locate auto/.al in @INC (@INC contains:
My knowledge of how AutoLoader is pretty much limited to what I have read in the perldoc, but if I'm calling the new method, should it be looking for auto/packagname/new.al? And if not, why doesn't this fail whenever I bypass my AUTOLOAD sub and just import the AUTOLOAD method from AutoLoader?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: AutoLoader no longer looks for .al files in the same place when I write my own AUTOLOAD
by ehdonhon (Curate) on Nov 14, 2001 at 04:44 UTC |