perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto C. Sánchez <>
Subject Re: Undefined subroutine error
Date Tue, 14 Apr 2009 02:54:02 GMT
On Mon, Apr 13, 2009 at 10:12:27PM -0400, Perrin Harkins wrote:
> In your module, do you declare a package name?  Do you export
> get_image_name()?  How do you load this module in your new Mason
> setup?
The entire Example/


package Example::Image;

use Image::ExifTool;
use vars qw( %dirs %urls );

sub get_image_data ($;$$) {
  my $image_name = $_[0];
  my $image_src = $_[1] ? $_[1] : $urls{'img'};
  my $image_dir = $_[2] ? $_[2] : $dirs{'img'};
  my %image_data;
  $image_data{'src'} = $image_src . $image_name;
  my $info = Image::ExifTool::ImageInfo($image_dir . $image_name);
  $image_data{'comment'} = $$info{'Comment'};
  $image_data{'width'} = $$info{'ImageWidth'};
  $image_data{'height'} = $$info{'ImageHeight'};
  return %image_data;



The module is loaded with a 'PerlModule Example::Image' directive.  I
have also tried without the PerlModule directive and with 'use' in the
global.asa (for Apache::ASP) and the main component (for HTML::Mason).

> > This has really been causing me to wrack my brain since
> > it only occurs on the production server and not on the development
> > server (both are identically configured).
> Are they really identically configured?  Are you sure there isn't a
> difference in or in MaxRequestsPerChild or something like
> that?
I have no and the MaxRequestsPerChild setting is identical
for both servers.

The only differences that I found were mod_include and mod_disk_cache
were enabled on the development server, but not on the production
server.  I have enabled them in production to see if that makes a
difference.  For the moment, the 500 errors have seemingly disappeared.
However, they have on occasion disappeared only to return after a day or

But for now it appears to be OK for a few tens of thousands of requests.



Roberto C. Sánchez

View raw message