r5263 - in /packages/libspreadsheet-parseexcel-perl/trunk/debian: changelog patches/10objref.dpatch

ntyni-guest at users.alioth.debian.org ntyni-guest at users.alioth.debian.org
Fri Apr 20 18:11:41 UTC 2007


Author: ntyni-guest
Date: Fri Apr 20 18:11:40 2007
New Revision: 5263

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5263
Log:
update 10objref.dpatch

Modified:
    packages/libspreadsheet-parseexcel-perl/trunk/debian/changelog
    packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch

Modified: packages/libspreadsheet-parseexcel-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libspreadsheet-parseexcel-perl/trunk/debian/changelog?rev=5263&op=diff
==============================================================================
--- packages/libspreadsheet-parseexcel-perl/trunk/debian/changelog (original)
+++ packages/libspreadsheet-parseexcel-perl/trunk/debian/changelog Fri Apr 20 18:11:40 2007
@@ -1,8 +1,9 @@
 libspreadsheet-parseexcel-perl (0.3000-1) UNRELEASED; urgency=low
 
   * (NOT RELEASED YET) New upstream release
+  * updated debian/patches/10objref.dpatch
 
- -- Niko Tyni <ntyni at iki.fi>  Fri, 20 Apr 2007 13:45:59 +0300
+ -- Niko Tyni <ntyni at iki.fi>  Fri, 20 Apr 2007 21:11:14 +0300
 
 libspreadsheet-parseexcel-perl (0.2800-1) unstable; urgency=low
 

Modified: packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch?rev=5263&op=diff
==============================================================================
--- packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch (original)
+++ packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch Fri Apr 20 18:11:40 2007
@@ -9,56 +9,27 @@
 diff -urNad trunk~/lib/Spreadsheet/ParseExcel.pm trunk/lib/Spreadsheet/ParseExcel.pm
 --- trunk~/lib/Spreadsheet/ParseExcel.pm	2007-02-25 22:30:22.000000000 +0200
 +++ trunk/lib/Spreadsheet/ParseExcel.pm	2007-02-25 22:30:56.000000000 +0200
-@@ -332,6 +332,7 @@
-     my($oThis, $sFile, $oWkFmt)=@_;
-     my($sWk, $bLen);
+@@ -430,6 +430,7 @@
+ sub _get_content {
+     my ($self, $source, $oBook) = @_;
  
-+    my $ref  = ref($sFile);
- #0. New $oBook
-     my $oBook = Spreadsheet::ParseExcel::Workbook->new;
-     $oBook->{SheetCount} = 0;
-@@ -339,7 +340,7 @@
- #1.Get content
-     my($sBIFF, $iLen);
-     
--    if(ref($sFile) eq "SCALAR") {
-+    if($ref eq "SCALAR") {
- #1.1 Specified by Buffer
-         ($sBIFF, $iLen) = $oThis->{GetContent}->($sFile);
-         return undef unless($sBIFF);
-@@ -349,8 +350,8 @@
- #        return undef;
- #    }
- #1.2 Specified by GLOB reference
--     elsif((ref($sFile) =~ /GLOB/) or
--           (ref($sFile) eq 'Fh')) { #For CGI.pm (Light FileHandle)
-+     elsif(($ref =~ /GLOB/) or
-+           ($ref eq 'Fh')) { #For CGI.pm (Light FileHandle)
-         binmode($sFile);
-         my $sWk;
-         my $sBuff='';
-@@ -360,15 +361,22 @@
-         ($sBIFF, $iLen) = $oThis->{GetContent}->(\$sBuff);
-         return undef unless($sBIFF);
-      }
--    elsif(ref($sFile) eq 'ARRAY') {
-+    elsif($ref eq 'ARRAY') {
- #1.3 Specified by File content
-         $oBook->{File} = undef;
-         my $sData = join('', @$sFile);
-         ($sBIFF, $iLen) = $oThis->{GetContent}->(\$sData);
-         return undef unless($sBIFF);
-     }
-+    elsif (grep {$ref eq $_} qw(IO::File IO::Handle IO::Wrap)) {
-+#1.4 Specified by IO::File/Handle/Wrap object
++    my $ref = ref($source);
+     if(ref($source) eq "SCALAR") {
+         #1.1 Specified by Buffer
+         my ($sBIFF, $iLen) = $self->{GetContent}->($source);
+@@ -456,8 +457,14 @@
+         my $sData = join('', @$source);
+         my ($sBIFF, $iLen) = $self->{GetContent}->(\$sData);
+         return $sBIFF ? ($sBIFF, $iLen) : (undef);
++    } elsif (grep {$ref eq $_} qw(IO::File IO::Handle IO::Wrap)) {
++        #1.4 Specified by IO::File/Handle/Wrap object
 +        $oBook->{File} = undef;
-+        my $sBuff = join('',$sFile->getlines);
-+        ($sBIFF, $iLen) = $oThis->{GetContent}->(\$sBuff);
-+        return undef unless($sBIFF);
-+    }
-     else {
--#1.4 Specified by File name
-+#1.5 Specified by File name
-         $oBook->{File} = $sFile;
-         return undef unless (-e $sFile);
-         ($sBIFF, $iLen) = $oThis->{GetContent}->($sFile);
++        my $sBuff = join('',$source->getlines);
++        my ($sBIFF, $iLen) = $self->{GetContent}->(\$sBuff);
++        return $sBIFF ? ($sBIFF, $iLen) : (undef);
+     } else {
+-        #1.4 Specified by File name
++        #1.5 Specified by File name
+         $oBook->{File} = $source;
+         return undef unless (-e $source);
+         my ($sBIFF, $iLen) = $self->{GetContent}->($source);




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