r29116 - in /trunk/libspreadsheet-read-perl: Changes MANIFEST META.yml Makefile.PL Read.pm debian/changelog files/macosx.csv t/22_csv.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Jan 1 21:27:51 UTC 2009
Author: gregoa
Date: Thu Jan 1 21:27:48 2009
New Revision: 29116
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=29116
Log:
New upstream release.
Added:
trunk/libspreadsheet-read-perl/files/macosx.csv
- copied unchanged from r29115, branches/upstream/libspreadsheet-read-perl/current/files/macosx.csv
trunk/libspreadsheet-read-perl/t/22_csv.t
- copied unchanged from r29115, branches/upstream/libspreadsheet-read-perl/current/t/22_csv.t
Modified:
trunk/libspreadsheet-read-perl/Changes
trunk/libspreadsheet-read-perl/MANIFEST
trunk/libspreadsheet-read-perl/META.yml
trunk/libspreadsheet-read-perl/Makefile.PL
trunk/libspreadsheet-read-perl/Read.pm
trunk/libspreadsheet-read-perl/debian/changelog
Modified: trunk/libspreadsheet-read-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libspreadsheet-read-perl/Changes?rev=29116&op=diff
==============================================================================
--- trunk/libspreadsheet-read-perl/Changes (original)
+++ trunk/libspreadsheet-read-perl/Changes Thu Jan 1 21:27:48 2009
@@ -1,6 +1,11 @@
Revision history for Spreadsheet::Read
-0.29 Tue 21 Oct 2008
+0.30 Mon 22 Dec 2008
+
+ - Wrong e-mail in META.yml
+ - CSV files from a Mac, with \r as eol, would not parse
+
+0.29 Sun 19 Oct 2008
- Make Read safer for files that do not match extension,
like HTML in foo.xls
Modified: trunk/libspreadsheet-read-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libspreadsheet-read-perl/MANIFEST?rev=29116&op=diff
==============================================================================
--- trunk/libspreadsheet-read-perl/MANIFEST (original)
+++ trunk/libspreadsheet-read-perl/MANIFEST Thu Jan 1 21:27:48 2009
@@ -11,6 +11,7 @@
files/empty.sc
files/empty.sxc
files/empty.xls
+files/macosx.csv
files/macosx.xls
files/misc.xls
files/test.csv
@@ -32,6 +33,7 @@
t/11_call.t
t/20_csv.t
t/21_csv.t
+t/22_csv.t
t/30_xls.t
t/31_clr.t
t/33_misc.t
Modified: trunk/libspreadsheet-read-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libspreadsheet-read-perl/META.yml?rev=29116&op=diff
==============================================================================
--- trunk/libspreadsheet-read-perl/META.yml (original)
+++ trunk/libspreadsheet-read-perl/META.yml Thu Jan 1 21:27:48 2009
@@ -1,16 +1,16 @@
--- #YAML:1.1
name: Read
-version: 0.29
+version: 0.30
abstract: Meta-Wrapper for reading spreadsheet data
license: perl
author:
- - H.Merijn Brand <h.merijn at xs4all.nl>
+ - H.Merijn Brand <h.m.brand at xs4all.nl>
generated_by: Author
distribution_type: module
provides:
Spreadsheet::Read:
file: Read.pm
- version: 0.29
+ version: 0.30
requires:
perl: 5.006
Exporter: 0
@@ -31,14 +31,14 @@
recommends:
Text::CSV: 1
Text::CSV_PP: 1.05
- Text::CSV_XS: 0.56
+ Text::CSV_XS: 0.57
- opt_excel:
description: Provides parsing of Microsoft Excel files
requires:
Spreadsheet::ParseExcel: 0.26
Spreadsheet::ParseExcel::FmtDefault: 0
recommends:
- Spreadsheet::ParseExcel: 0.34
+ Spreadsheet::ParseExcel: 0.41
- opt_oo:
description: Provides parsing of OpenOffice spreadsheets
requires:
Modified: trunk/libspreadsheet-read-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libspreadsheet-read-perl/Makefile.PL?rev=29116&op=diff
==============================================================================
--- trunk/libspreadsheet-read-perl/Makefile.PL (original)
+++ trunk/libspreadsheet-read-perl/Makefile.PL Thu Jan 1 21:27:48 2009
@@ -90,7 +90,8 @@
'tgzdist: checkmeta fixmeta $(DISTVNAME).tar.gz distcheck',
' - at mv -f $(DISTVNAME).tar.gz $(DISTVNAME).tgz',
' - at cpants_lint.pl $(DISTVNAME).tgz',
- ' - at rm -f Debian_CPANTS.txt';
+ ' - at rm -f Debian_CPANTS.txt',
+ '';
} # postamble
1;
Modified: trunk/libspreadsheet-read-perl/Read.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libspreadsheet-read-perl/Read.pm?rev=29116&op=diff
==============================================================================
--- trunk/libspreadsheet-read-perl/Read.pm (original)
+++ trunk/libspreadsheet-read-perl/Read.pm Thu Jan 1 21:27:48 2009
@@ -21,7 +21,7 @@
use strict;
use warnings;
-our $VERSION = "0.29";
+our $VERSION = "0.30";
sub Version { $VERSION }
use Carp;
@@ -206,6 +206,8 @@
$debug and print STDERR "Opening CSV $txt\n";
open my $in, "<", $txt or return;
+
+ local $/ = $/;
my $csv;
my @data = (
{ type => "csv",
@@ -223,7 +225,16 @@
attr => [],
},
);
+
$_ = <$in>;
+ if (eof ($in)) {
+ # This file is either just one single line, or uses \r as eol
+ close $in;
+ open $in, "<", $txt or return;
+ $/ = "\r";
+ $_ = <$in>;
+ }
+
my $quo = defined $opt{quote} ? $opt{quote} : '"';
my $sep = # If explicitly set, use it
defined $opt{sep} ? $opt{sep} :
@@ -236,15 +247,14 @@
m/\w,[\w,]/ ? "," :
m/\w\t[\w,]/ ? "\t" :
"," ;
- my ($eol) = m{([\r\n]+)\z};
$debug > 1 and print STDERR "CSV sep_char '$sep', quote_char '$quo'\n";
$csv = $can{csv}->new ({
sep_char => ($data[0]{sepchar} = $sep),
quote_char => ($data[0]{quote} = $quo),
- eol => $eol,
keep_meta_info => 1, # Ignored for Text::CSV_XS <= 0.27
binary => 1,
- }) or croak "Cannot create a csv ('$sep', '$quo', '$eol') parser!";
+ eol => $/,
+ }) or croak "Cannot create a csv ('$sep', '$quo') parser!";
# while ($row = $csv->getline () {
# doesn't work, because I have to fetch the first line for auto
@@ -267,6 +277,7 @@
$csv = undef;
}
} while ($csv && ($row = $csv->getline ($in)));
+ $csv->eof () or $csv->error_diag;
close $in;
for (@{$data[1]{cell}}) {
Modified: trunk/libspreadsheet-read-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libspreadsheet-read-perl/debian/changelog?rev=29116&op=diff
==============================================================================
--- trunk/libspreadsheet-read-perl/debian/changelog (original)
+++ trunk/libspreadsheet-read-perl/debian/changelog Thu Jan 1 21:27:48 2009
@@ -1,5 +1,6 @@
-libspreadsheet-read-perl (0.29-2) UNRELEASED; urgency=low
+libspreadsheet-read-perl (0.30-1) UNRELEASED; urgency=low
+ * New upstream release.
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
(source stanza).
More information about the Pkg-perl-cvs-commits
mailing list