r2010 - in packages/libspreadsheet-parseexcel-perl/trunk: . ParseExcel debian/patches

Niko Tyni ntyni-guest at costa.debian.org
Thu Jan 19 20:17:49 UTC 2006


Author: ntyni-guest
Date: 2006-01-19 20:17:48 +0000 (Thu, 19 Jan 2006)
New Revision: 2010

Added:
   packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/00list
   packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch
   packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/20general.dpatch
Modified:
   packages/libspreadsheet-parseexcel-perl/trunk/ParseExcel.pm
   packages/libspreadsheet-parseexcel-perl/trunk/ParseExcel/Utility.pm
Log:
Move old patches to dpatch.


Modified: packages/libspreadsheet-parseexcel-perl/trunk/ParseExcel/Utility.pm
===================================================================
--- packages/libspreadsheet-parseexcel-perl/trunk/ParseExcel/Utility.pm	2006-01-19 20:12:03 UTC (rev 2009)
+++ packages/libspreadsheet-parseexcel-perl/trunk/ParseExcel/Utility.pm	2006-01-19 20:17:48 UTC (rev 2010)
@@ -33,12 +33,6 @@
     my $sCond;
     my $sWkF ='';
     my $sRes='';
-
-    ### Debian-specific patch provided by Niko Tyni. Bug exists with ID 7206
-    ### in the CPAN request tracker.
-    # OpenOffice peculiarity?
-    $sFmt = '@' if ($sFmt eq "GENERAL");
-
 #1. Get Condition
     if($sFmt=~/^\[([<>=][^\]]+)\](.*)$/) {
         $sCond = $1;

Modified: packages/libspreadsheet-parseexcel-perl/trunk/ParseExcel.pm
===================================================================
--- packages/libspreadsheet-parseexcel-perl/trunk/ParseExcel.pm	2006-01-19 20:12:03 UTC (rev 2009)
+++ packages/libspreadsheet-parseexcel-perl/trunk/ParseExcel.pm	2006-01-19 20:17:48 UTC (rev 2010)
@@ -336,7 +336,6 @@
     my($oThis, $sFile, $oWkFmt)=@_;
     my($sWk, $bLen);
 
-    my $ref  = ref($sFile);
 #0. New $oBook
     my $oBook = Spreadsheet::ParseExcel::Workbook->new;
     $oBook->{SheetCount} = 0;
@@ -344,7 +343,7 @@
 #1.Get content
     my($sBIFF, $iLen);
     
-    if($ref eq "SCALAR") {
+    if(ref($sFile) eq "SCALAR") {
 #1.1 Specified by Buffer
         ($sBIFF, $iLen) = $oThis->{GetContent}->($sFile);
         return undef unless($sBIFF);	
@@ -354,8 +353,8 @@
 #        return undef;
 #    }
 #1.2 Specified by GLOB reference
-     elsif(($ref =~ /GLOB/) or
-           ($ref eq 'Fh')) { #For CGI.pm (Light FileHandle)
+     elsif((ref($sFile) =~ /GLOB/) or
+           (ref($sFile) eq 'Fh')) { #For CGI.pm (Light FileHandle)
         binmode($sFile);
         my $sWk;
         my $sBuff='';
@@ -365,22 +364,15 @@
         ($sBIFF, $iLen) = $oThis->{GetContent}->(\$sBuff);
         return undef unless($sBIFF);
      }
-    elsif($ref eq 'ARRAY') {
+    elsif(ref($sFile) 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
-        $oBook->{File} = undef;
-        my $sBuff = join('',$sFile->getlines);
-        ($sBIFF, $iLen) = $oThis->{GetContent}->(\$sBuff);
-        return undef unless($sBIFF);
-    }
     else {
-#1.5 Specified by File name
+#1.4 Specified by File name
         $oBook->{File} = $sFile;
         return undef unless (-e $sFile);
         ($sBIFF, $iLen) = $oThis->{GetContent}->($sFile);

Added: packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/00list
===================================================================
--- packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/00list	2006-01-19 20:12:03 UTC (rev 2009)
+++ packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/00list	2006-01-19 20:17:48 UTC (rev 2010)
@@ -0,0 +1,2 @@
+10objref.dpatch
+20general.dpatch

Added: packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch
===================================================================
--- packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch	2006-01-19 20:12:03 UTC (rev 2009)
+++ packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch	2006-01-19 20:17:48 UTC (rev 2010)
@@ -0,0 +1,64 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10objref.dpatch by Niko Tyni <ntyni at iki.fi>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Allow IO::File/Handle/Wrap objects to be passed in.
+## DP: (#112130, patch by Gunnar Wolf)
+
+ at DPATCH@
+diff -urNad trunk~/ParseExcel.pm trunk/ParseExcel.pm
+--- trunk~/ParseExcel.pm	2006-01-19 22:12:32.000000000 +0200
++++ trunk/ParseExcel.pm	2006-01-19 22:13:51.368259910 +0200
+@@ -336,6 +336,7 @@
+     my($oThis, $sFile, $oWkFmt)=@_;
+     my($sWk, $bLen);
+ 
++    my $ref  = ref($sFile);
+ #0. New $oBook
+     my $oBook = Spreadsheet::ParseExcel::Workbook->new;
+     $oBook->{SheetCount} = 0;
+@@ -343,7 +344,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);	
+@@ -353,8 +354,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='';
+@@ -364,15 +365,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
++        $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);


Property changes on: packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/10objref.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/20general.dpatch
===================================================================
--- packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/20general.dpatch	2006-01-19 20:12:03 UTC (rev 2009)
+++ packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/20general.dpatch	2006-01-19 20:17:48 UTC (rev 2010)
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20general.dpatch by Niko Tyni <ntyni at iki.fi>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Handle files generated by Openoffice with the format "GENERAL".
+## (#298484)
+
+ at DPATCH@
+diff -urNad trunk~/ParseExcel/Utility.pm trunk/ParseExcel/Utility.pm
+--- trunk~/ParseExcel/Utility.pm	2006-01-19 22:15:40.000000000 +0200
++++ trunk/ParseExcel/Utility.pm	2006-01-19 22:15:51.355439717 +0200
+@@ -33,6 +33,12 @@
+     my $sCond;
+     my $sWkF ='';
+     my $sRes='';
++
++    ### Debian-specific patch provided by Niko Tyni. Bug exists with ID 7206
++    ### in the CPAN request tracker.
++    # OpenOffice peculiarity?
++    $sFmt = '@' if ($sFmt eq "GENERAL");
++
+ #1. Get Condition
+     if($sFmt=~/^\[([<>=][^\]]+)\](.*)$/) {
+         $sCond = $1;


Property changes on: packages/libspreadsheet-parseexcel-perl/trunk/debian/patches/20general.dpatch
___________________________________________________________________
Name: svn:executable
   + *




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