hesco has asked for the wisdom of the Perl Monks concerning the following question:
Hola, all:
Last week I added fastcgi to my development server and now code which was essentially working is churning out errors like:
This code under development is organized as follows:Can't locate object method "_any_method_I_call" via package
My::Module begins:My::Module My::Module::Foo My::Module::Bar My::Module::Baz
and each of those modules begins:package My::Module; use warnings; use strict; . . . use My::Module::Foo qw( :all ); use My::Module::Bar qw( :all ); use My::Module::Baz qw( :all );
I have been able to restore some functionality by fully qualifying my method calls like so:package My::Module::Foo; use strict; use warnings; use Exporter; our @EXPORT = qw( this_method that_method ); our %EXPORT_TAGS = ( all => [qw( this_method that_method )] );
But there are 106 mostly working methods in this application so far and it is still growing. I would love not to have to rewrite every method call in the package in this way. Can anyone please advise me what is the matter here and what I could do about this?My::Module::Foo::this_method($self,@args);
Any clues appreciated.
-- Hugh
UPDATE:
Thanks to a remark in ikegami's post below, I went back into each of my use'd modules and changed them like so:
The result is that my code seems to work again. Thank you everyone who contributed to this discussion. Even those posts which did not immediately resolve this taught me quite a bit about the innards of perl. I had heard often of the symbol table, but had never known how to access it before. I suspect that should prove invaluable in the future. Thank you ikigami, perrin, esper, and how ever many anonymous monks may have contributed to this discussion.- use Exporter; + use Exporter qw( import );
I'm still curious why the pre-patch version worked before the dist-upgrade, but not after. But I'm grateful to be moving forward again. I'm hopeful I may yet have this code ready for a public launch at next weekend's conference. We shall see.
if( $lal && $lol ) { $life++; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: fastcgi broke my Exports
by perrin (Chancellor) on Jul 13, 2009 at 19:44 UTC | |
by hesco (Deacon) on Jul 13, 2009 at 20:19 UTC | |
by perrin (Chancellor) on Jul 13, 2009 at 21:06 UTC | |
by hesco (Deacon) on Jul 13, 2009 at 23:19 UTC | |
by perrin (Chancellor) on Jul 14, 2009 at 17:22 UTC | |
by Anonymous Monk on Jul 14, 2009 at 07:34 UTC | |
Re: fastcgi did NOT break my Exports, issue now resolved
by ikegami (Patriarch) on Jul 15, 2009 at 23:07 UTC | |
Re: fastcgi broke my Exports
by ikegami (Patriarch) on Jul 15, 2009 at 22:26 UTC | |
Re: fastcgi broke my Exports
by hesco (Deacon) on Jul 15, 2009 at 13:50 UTC | |
by Anonymous Monk on Jul 15, 2009 at 14:02 UTC | |
by hesco (Deacon) on Jul 15, 2009 at 15:07 UTC | |
by perrin (Chancellor) on Jul 15, 2009 at 19:10 UTC | |
by hesco (Deacon) on Jul 15, 2009 at 21:41 UTC | |
| |
by Anonymous Monk on Jul 15, 2009 at 15:59 UTC | |
Re: fastcgi broke my Exports
by dsheroh (Monsignor) on Jul 14, 2009 at 09:38 UTC | |
Re: fastcgi broke my Exports
by hesco (Deacon) on Jul 15, 2009 at 06:03 UTC | |
by Anonymous Monk on Jul 15, 2009 at 06:49 UTC | |
Re: fastcgi broke my Exports
by hesco (Deacon) on Jul 15, 2009 at 05:55 UTC |
Back to
Seekers of Perl Wisdom