Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: fastcgi broke my Exports

by ikegami (Patriarch)
on Jul 15, 2009 at 22:26 UTC ( [id://780497]=note: print w/replies, xml ) Need Help??


in reply to fastcgi did NOT break my Exports, issue now resolved

You're going into such details, but you haven't even covered the basics yet.
  • You aren't using Exporter. Well, you're loading it, but you don't do anything with it as far as you've shown. You need to import import from Exporter or setup an inheritance relationship. You haven't shown either.

  • You're also didn't specify from which package you issued the call that resulted in the error.

  • You haven't shown or even claimed that you do use My::Module::Foo; from that package.

I have no problem reproducing the error from what you've told us:

$ cat Foo.pm package Foo; use strict; use warnings; use Exporter; our @EXPORT = qw( this_method that_method ); our %EXPORT_TAGS = ( all => [qw( this_method that_method )] ); sub this_method_that_method { "Hello World" } 1; $ cat a.pl use strict; use warnings; use Foo; print this_method_that_method(), "\n"; $ perl a.pl Undefined subroutine &main::this_method_that_method called at a.pl lin +e 6.

By the way, dumping the symbol table is of limited usefulness. It's just too easy to create the entry whose existence you want to check. And the existence of an entry doesn't say anything about whether a sub is associated with that name. And even if you verified the existence of a sub, you still don't know if that sub has been defined.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://780497]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found