r46193 - in /trunk/libimage-size-perl: debian/changelog debian/patches/install-imgsize debian/patches/series imgsize

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Thu Oct 22 13:36:38 UTC 2009


Author: jawnsy-guest
Date: Thu Oct 22 13:36:30 2009
New Revision: 46193

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46193
Log:
Remove the install-imgsize patch; it's now installed by default

Removed:
    trunk/libimage-size-perl/debian/patches/install-imgsize
Modified:
    trunk/libimage-size-perl/debian/changelog
    trunk/libimage-size-perl/debian/patches/series
    trunk/libimage-size-perl/imgsize

Modified: trunk/libimage-size-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/debian/changelog?rev=46193&op=diff
==============================================================================
--- trunk/libimage-size-perl/debian/changelog (original)
+++ trunk/libimage-size-perl/debian/changelog Thu Oct 22 13:36:30 2009
@@ -4,6 +4,7 @@
   * New upstream release
   * Add myself to Uploaders and Copyright
   * Updated watch with mangle to handle new versions
+  * Remove the install-imgsize patch; it's now installed by default
 
   [ Ryan Niebur ]
   * Update ryan52's email address

Modified: trunk/libimage-size-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/debian/patches/series?rev=46193&op=diff
==============================================================================
--- trunk/libimage-size-perl/debian/patches/series (original)
+++ trunk/libimage-size-perl/debian/patches/series Thu Oct 22 13:36:30 2009
@@ -1,2 +1,1 @@
 imgsize-fixes
-install-imgsize

Modified: trunk/libimage-size-perl/imgsize
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/imgsize?rev=46193&op=diff
==============================================================================
--- trunk/libimage-size-perl/imgsize (original)
+++ trunk/libimage-size-perl/imgsize Thu Oct 22 13:36:30 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 = \&html_imgsize;
+$rtn = \&return_html;
 $opt_a &&
     ($rtn = \&return_attr);
 $opt_r &&
@@ -98,11 +98,13 @@
 $opt_f &&
     ($rtn = \&return_fmt);
 
+my $error = 0;
+
 if (@ARGV > 1)
 {
     foreach (@ARGV)
     {
-        print STDOUT sprintf("$_: %s\n", &$rtn($_));
+        print STDOUT sprintf("%s: %s\n", $_, &$rtn($_));
     }
 }
 else
@@ -110,7 +112,7 @@
     print STDOUT sprintf("%s\n", &$rtn($ARGV[0]));
 }
 
-exit;
+exit $error;
 
 #
 # Note the doubled calls here. This is just a quick, semi-clean attempt at
@@ -118,24 +120,31 @@
 # 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";
+        "(-width => $width, -height => $height)" : ("error: $err", $error = 1);
 }
 
 sub return_imgsize
 {
     my ($width, $height, $err) = imgsize($_[0]);
 
-    (defined $width) ? "$width $height" : "error: $err";
+    (defined $width) ? "$width $height" : ("error: $err", $error = 1);
 }
 
 sub return_fmt
 {
     my ($width, $height, $err) = imgsize($_[0]);
 
-    (defined $width) ? sprintf($opt_f, $width, $height, $err) : "error: $err";
+    (defined $width) ? sprintf($opt_f, $width, $height, $err) : ("error: $err", $error = 1);
 }




More information about the Pkg-perl-cvs-commits mailing list