r41820 - in /trunk/libimage-size-perl: Makefile.PL debian/changelog debian/control imgsize

myon at users.alioth.debian.org myon at users.alioth.debian.org
Fri Aug 14 15:32:42 UTC 2009


Author: myon
Date: Fri Aug 14 15:32:35 2009
New Revision: 41820

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41820
Log:
releasing version 3.2-2

Modified:
    trunk/libimage-size-perl/Makefile.PL
    trunk/libimage-size-perl/debian/changelog
    trunk/libimage-size-perl/debian/control
    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=41820&op=diff
==============================================================================
--- trunk/libimage-size-perl/Makefile.PL (original)
+++ trunk/libimage-size-perl/Makefile.PL Fri Aug 14 15:32:35 2009
@@ -11,6 +11,6 @@
                            'Test::More' => '0.80'
                          },
           'INSTALLDIRS' => 'site',
-          'EXE_FILES' => []
+          'EXE_FILES' => ['imgsize']
         )
 ;

Modified: trunk/libimage-size-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/debian/changelog?rev=41820&op=diff
==============================================================================
--- trunk/libimage-size-perl/debian/changelog (original)
+++ trunk/libimage-size-perl/debian/changelog Fri Aug 14 15:32:35 2009
@@ -1,4 +1,4 @@
-libimage-size-perl (3.2-2) UNRELEASED; urgency=low
+libimage-size-perl (3.2-2) unstable; urgency=low
 
   [ Nathan Handler ]
   * debian/watch: Update to ignore development releases.
@@ -9,7 +9,7 @@
   [ Christoph Berg ]
   * Remove me from Uploaders.
 
- -- Nathan Handler <nhandler at ubuntu.com>  Sat, 06 Jun 2009 01:31:46 +0000
+ -- Christoph Berg <myon at debian.org>  Fri, 14 Aug 2009 17:25:41 +0200
 
 image-size (3.2-1) unstable; urgency=low
 

Modified: trunk/libimage-size-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/debian/control?rev=41820&op=diff
==============================================================================
--- trunk/libimage-size-perl/debian/control (original)
+++ trunk/libimage-size-perl/debian/control Fri Aug 14 15:32:35 2009
@@ -4,7 +4,7 @@
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: gregor herrmann <gregor+debian at comodo.priv.at>,
  Ryan Niebur <ryanryan52 at gmail.com>
-Standards-Version: 3.8.0
+Standards-Version: 3.8.2
 Build-Depends: debhelper (>> 7), quilt
 Build-Depends-Indep: perl, libcompress-zlib-perl (>> 2), libtest-pod-perl,
  libtest-pod-coverage-perl

Modified: trunk/libimage-size-perl/imgsize
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/imgsize?rev=41820&op=diff
==============================================================================
--- trunk/libimage-size-perl/imgsize (original)
+++ trunk/libimage-size-perl/imgsize Fri Aug 14 15:32:35 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