r41821 - in /trunk/libimage-size-perl: Makefile.PL imgsize
myon at users.alioth.debian.org
myon at users.alioth.debian.org
Fri Aug 14 15:36:36 UTC 2009
Author: myon
Date: Fri Aug 14 15:36:31 2009
New Revision: 41821
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41821
Log:
revert commit with quilt patches applied
Modified:
trunk/libimage-size-perl/Makefile.PL
trunk/libimage-size-perl/imgsize
Modified: trunk/libimage-size-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/Makefile.PL?rev=41821&op=diff
==============================================================================
--- trunk/libimage-size-perl/Makefile.PL (original)
+++ trunk/libimage-size-perl/Makefile.PL Fri Aug 14 15:36:31 2009
@@ -11,6 +11,6 @@
'Test::More' => '0.80'
},
'INSTALLDIRS' => 'site',
- 'EXE_FILES' => ['imgsize']
+ 'EXE_FILES' => []
)
;
Modified: trunk/libimage-size-perl/imgsize
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/imgsize?rev=41821&op=diff
==============================================================================
--- trunk/libimage-size-perl/imgsize (original)
+++ trunk/libimage-size-perl/imgsize Fri Aug 14 15:36:31 2009
@@ -32,7 +32,7 @@
=head1 OPTIONS
By default, the width and height are returned as attributes for an IMG tag
-in HTML, essentially C<width="40" height="30">. The following options may be
+in HTML, essentially "C<WIDTH=40 HEIGHT=30>". The following options may be
used to return alternate formats (all report width first, then height):
=over
@@ -90,7 +90,7 @@
if ($opt_h || (! @ARGV) || (($opt_a && $opt_r) || ($opt_a && $opt_f) ||
($opt_r && $opt_f)));
-$rtn = \&return_html;
+$rtn = \&html_imgsize;
$opt_a &&
($rtn = \&return_attr);
$opt_r &&
@@ -98,13 +98,11 @@
$opt_f &&
($rtn = \&return_fmt);
-my $error = 0;
-
if (@ARGV > 1)
{
foreach (@ARGV)
{
- print STDOUT sprintf("%s: %s\n", $_, &$rtn($_));
+ print STDOUT sprintf("$_: %s\n", &$rtn($_));
}
}
else
@@ -112,7 +110,7 @@
print STDOUT sprintf("%s\n", &$rtn($ARGV[0]));
}
-exit $error;
+exit;
#
# Note the doubled calls here. This is just a quick, semi-clean attempt at
@@ -120,31 +118,24 @@
# the Image::Size package.
#
-sub return_html
-{
- my ($html) = html_imgsize($_[0]);
-
- (defined $html) ? $html : ("error", $error = 1);
-}
-
sub return_attr
{
my ($width, $height, $err) = imgsize($_[0]);
(defined $width) ?
- "(-width => $width, -height => $height)" : ("error: $err", $error = 1);
+ "(-width => $width, -height => $height)" : "error: $err";
}
sub return_imgsize
{
my ($width, $height, $err) = imgsize($_[0]);
- (defined $width) ? "$width $height" : ("error: $err", $error = 1);
+ (defined $width) ? "$width $height" : "error: $err";
}
sub return_fmt
{
my ($width, $height, $err) = imgsize($_[0]);
- (defined $width) ? sprintf($opt_f, $width, $height, $err) : ("error: $err", $error = 1);
+ (defined $width) ? sprintf($opt_f, $width, $height, $err) : "error: $err";
}
More information about the Pkg-perl-cvs-commits
mailing list