Sure-- this stuff works ok almost all the time. The sporadic behavior is one that is hard to describe, really. But, to answer your question, here's some code: (note the inclusion of the Register module)
package MyUserProfile; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(ProfileGet ProfileSave ProfileEdit ProfileUpdate ProfileFix ProfileExtract ProfileFixContactInf +o $user_data $contact_strings, @contact_info); our $VERSION = 1.00; use MyErrors; use CGI; use Register qw(PrintTemplate RegisterChange RegisterAcctPath Register +SetupUser EDIT_PROFILE VIEW_IMAGES read_user_db); use MyUtils qw(:DEFAULT);
Now, here's a snippet from Register:
[...] use MyUserProfile qw(:DEFAULT); [...sometime later in some function...] my $acct_data = MyUserProfile::ProfileGet($acct); [...]
Even though ProfileGet() is properly exported, I can't just call it without perl complaining about Register.pm calling an undefined function. I have to use it in the form above to get it to shup up (and work). But this is the frustrating part: it's not ALWAYS the case. Sometimes, functions can be called directly, whereas other times, maybe not. Maybe there's a pattern to when it works and when it doesn't, but suffice to say, I can't see it (hence, the appearance of randomness).
Could the inter-dependence on the modules to one another be causing this, or point to the direction of the problem?
In reply to Re^2: error for undefined function that's been imported
by argv
in thread error for undefined function that's been imported
by argv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |