Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hola, all:

Last week I added fastcgi to my development server and now code which was essentially working is churning out errors like:

Can't locate object method "_any_method_I_call" via package
This code under development is organized as follows:

My::Module My::Module::Foo My::Module::Bar My::Module::Baz
My::Module 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 );
and each of those modules begins:

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 )] );
I have been able to restore some functionality by fully qualifying my method calls like so:

My::Module::Foo::this_method($self,@args);
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?

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:

- use Exporter; + use Exporter qw( import );
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.

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++; }

In reply to fastcgi did NOT break my Exports, issue now resolved by hesco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 20:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found