From cba0ccec3f147d21709725f8813df74dd5df466b Mon Sep 17 00:00:00 2001 From: Gisle Aas Date: Mon, 24 Nov 2008 23:58:45 +0100 Subject: [PATCH] Image-Info-1.15.tar.gz --- Changes | 9 +++++++++ Info.pm.tmpl | 12 +++++++++--- lib/Image/Info.pm | 12 +++++++++--- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/Changes b/Changes index 36cee03..1d5346b 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,14 @@ 2003-10-06 Gisle Aas + Release 1.15 + + Avoid IO::String dependency for perl-5.8. It was supposed to + work but did not. + + + +2003-10-06 Gisle Aas + Release 1.14 Support TIFF/Exif GPS tags. diff --git a/Info.pm.tmpl b/Info.pm.tmpl index 712092d..c8c6072 100644 --- a/Info.pm.tmpl +++ b/Info.pm.tmpl @@ -10,7 +10,7 @@ use Symbol (); use vars qw($VERSION @EXPORT_OK); -$VERSION = '1.14'; +$VERSION = '1.15'; require Exporter; *import = \&Exporter::import; @@ -32,8 +32,14 @@ sub image_info $source = $fh; } elsif (ref($source) eq "SCALAR") { - require IO::String; - $source = IO::String->new($$source); + if ($] >= 5.008) { + open(my $s, "<", $source) or return _os_err("Can't open string"); + $source = $s; + } + else { + require IO::String; + $source = IO::String->new($$source); + } } else { seek($source, 0, 0) or return _os_err("Can't rewind"); diff --git a/lib/Image/Info.pm b/lib/Image/Info.pm index 6ca74a4..ba0bb7b 100644 --- a/lib/Image/Info.pm +++ b/lib/Image/Info.pm @@ -13,7 +13,7 @@ use Symbol (); use vars qw($VERSION @EXPORT_OK); -$VERSION = '1.14'; +$VERSION = '1.15'; require Exporter; *import = \&Exporter::import; @@ -35,8 +35,14 @@ sub image_info $source = $fh; } elsif (ref($source) eq "SCALAR") { - require IO::String; - $source = IO::String->new($$source); + if ($] >= 5.008) { + open(my $s, "<", $source) or return _os_err("Can't open string"); + $source = $s; + } + else { + require IO::String; + $source = IO::String->new($$source); + } } else { seek($source, 0, 0) or return _os_err("Can't rewind"); -- 2.11.4.GIT