Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl module cross reference problem

Status
Not open for further replies.

lcs01

Programmer
Joined
Aug 2, 2006
Messages
182
Location
US
One of my company's mod_perl page randomly produces an error:

Undefined subroutine &Design::getStyle called at {$root}/subdir/XYZ.pm line 3412.

where Design.pm is in {$root} dir:

Code:
#  FILE:       Design.pm
require 5.004;
use subdir::XYZ qw/-autoload :standard/;

sub getStyle
{
# some implementations here
}

The way that xyz.pm calling getStyle() is implemented as follows:

Code:
#  FILE:       XYZ.pm
package subdir::XYZ.pm;

sub function1
{
# some implementations here
[b]my $style = Design::getStyle; # this is line 3412[/b]
# some implementations here
}

So, apparently, this is a module cross reference. Is this wrong? If so, how to fix it?
 
Did you forget to package Design?
 
No, I did not forget that.

Actually, this is not my code. But I did make sure that there is 'package Design;' is the first line of Design.pm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top