Репозитории ALT
Группа :: Разработка/Perl
Пакет: perl-Image-Info
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: perl-Image-Info-1.16-alt-deps-perlio.patch
Скачать
Скачать
--- Image-Info-1.16~/Info.pm.tmpl 2004-01-07 15:39:11 +0300
+++ Image-Info-1.16/Info.pm.tmpl 2005-04-07 04:29:49 +0400
@@ -32,14 +32,8 @@ sub image_info
$source = $fh;
}
elsif (ref($source) eq "SCALAR") {
- 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");
@@ -47,13 +41,7 @@ sub image_info
my $head;
read($source, $head, 32) or return _os_err("Can't read head");
- if (ref($source) eq "IO::String") {
- # XXX workaround until we can trap seek() with a tied file handle
- $source->setpos(0);
- }
- else {
- seek($source, 0, 0) or _os_err("Can't rewind");
- }
+ seek($source, 0, 0) or _os_err("Can't rewind");
if (my $format = determine_file_format($head)) {
no strict 'refs';
--- Image-Info-1.16~/lib/Image/Info/JPEG.pm 2002-12-31 03:03:06 +0300
+++ Image-Info-1.16/lib/Image/Info/JPEG.pm 2005-04-07 04:29:49 +0400
@@ -55,26 +55,11 @@ sub my_read
$buf;
}
-BEGIN {
- my $f = ($] >= 5.008) ? <<'EOT' : <<'EOT';
sub with_io_string (&$) {
open(my $fh, "<", \$_[1]);
local $_ = $fh;
&{$_[0]};
}
-EOT
- sub with_io_string (&$) {
- require IO::String;
- local $_ = IO::String->new($_[1]);
- &{$_[0]};
- $_->close;
- }
-EOT
-
- #print $f;
- eval $f;
- die $@ if $@;
-}
sub process_file
{
--- Image-Info-1.16~/lib/Image/Info.pm 2004-01-07 15:46:43 +0300
+++ Image-Info-1.16/lib/Image/Info.pm 2005-04-07 04:29:49 +0400
@@ -35,14 +35,8 @@ sub image_info
$source = $fh;
}
elsif (ref($source) eq "SCALAR") {
- 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");
@@ -50,13 +44,7 @@ sub image_info
my $head;
read($source, $head, 32) or return _os_err("Can't read head");
- if (ref($source) eq "IO::String") {
- # XXX workaround until we can trap seek() with a tied file handle
- $source->setpos(0);
- }
- else {
- seek($source, 0, 0) or _os_err("Can't rewind");
- }
+ seek($source, 0, 0) or _os_err("Can't rewind");
if (my $format = determine_file_format($head)) {
no strict 'refs';