On Tue, Apr 14, 2009 at 07:48:49PM +0200, Torsten Foertsch wrote: > On Tue 14 Apr 2009, Roberto C. Sánchez wrote: > > I am currently using the latter call everywhere and it is still > > generating the "Undefined subroutine" error. > > Would it be possible to post your module? Perhaps you forgot > the "package" declaration? >
----------8<---------->8----------
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;
}
1;
----------8<---------->8----------
Also, let me ephasize that I have three sites using this exact same
module in the same exact manner as the problem site, yet without any
sort of problem.
Regards,
-Roberto
--
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com
signature.asc
Description: Digital signature
