commit perl-Text-CSV_XS for openSUSE:Factory
Hello community,
here is the log from the commit of package perl-Text-CSV_XS for openSUSE:Factory
checked in at Thu Mar 31 15:23:15 CEST 2011.
--------
--- perl-Text-CSV_XS/perl-Text-CSV_XS.changes 2010-12-01 14:56:16.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-Text-CSV_XS/perl-Text-CSV_XS.changes 2011-03-31 10:52:47.000000000 +0200
@@ -1,0 +2,22 @@
+Thu Mar 31 08:45:11 UTC 2011 - coolo@novell.com
+
+- update to 0.81
+ * Add is_missing ()
+ * Doc overhaul
+ * Fix Build on OpenVMS (RT#65654, Martin P.J. Zinser)
+ * Fix SetDiag () leak (RT#66453, Sven Sch366ling)
+ * Implement getline_all () and getaline_hr_all ()
+ * Fixed another parsing for eol = \r (RT#61525)
+ * Use correct type for STRLEN (HP-UX/PA-RISC/32)
+ * More code coverage
+ * EOF unreliable when line-end missing at eof
+ * Internals now use warn () instead of (void)fprintf (stderr, ...)
+ Now the test in t/80_diag also passes on Windows
+ * Better parsing for eol = \r and set as such (RT#61525)
+ * Workaround for AIX cpp bug (RT#62388, Jan Dubois)
+ * Spelling fixes
+ * Real eol support for parsing streams (beyond \n, \r and \r\n)
+ * Clarify doc for always_quote to not quote undef fields
+ * Clarify UTF8 process for print () and combine ()
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
Text-CSV_XS-0.73.tar.bz2
New:
----
Text-CSV_XS-0.81.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Text-CSV_XS.spec ++++++
--- /var/tmp/diff_new_pack.yeZLlH/_old 2011-03-31 15:20:35.000000000 +0200
+++ /var/tmp/diff_new_pack.yeZLlH/_new 2011-03-31 15:20:35.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package perl-Text-CSV_XS (Version 0.73)
+# spec file for package perl-Text-CSV_XS
#
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,24 +15,27 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
Name: perl-Text-CSV_XS
-%define cpan_name %( echo %{name} | %{__sed} -e 's,perl-,,' )
-Summary: Comma-separated values manipulation routines
-Version: 0.73
-Release: 2
-License: Artistic License ..
+Version: 0.81
+Release: 1
+License: GPL+ or Artistic
+%define cpan_name Text-CSV_XS
+Summary: comma-separated values manipulation routines
+Url: http://search.cpan.org/dist/Text-CSV_XS/
Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/Text-CSV_XS
-Source: %{cpan_name}-%{version}.tar.bz2
+#Source: http://www.cpan.org/authors/id/H/HM/HMBRAND/Text-CSV_XS-%{version}.tgz
+Source: %{cpan_name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
-BuildRequires: perl(Test::Pod) >= 1.00
-BuildRequires: perl(Test::Pod::Coverage)
+BuildRequires: perl(Config)
+BuildRequires: perl(DynaLoader)
+BuildRequires: perl(IO::Handle)
+Requires: perl(DynaLoader)
+Requires: perl(IO::Handle)
+%{perl_requires}
%description
Text::CSV_XS provides facilities for the composition and decomposition of
@@ -43,28 +46,75 @@
user-specified characters as delimiters, separators, and escapes so it is
perhaps better called ASV (anything separated values) rather than just CSV.
- Authors:
+Embedded newlines
+ *Important Note*: The default behavior is to only accept ASCII
+ characters. This means that fields can not contain newlines. If your
+ data contains newlines embedded in fields, or characters above 0x7e
+ (tilde), or binary data, you *must* set 'binary => 1' in the call to
+ 'new'. To cover the widest range of parsing options, you will always
+ want to set binary.
+
+ But you still have the problem that you have to pass a correct line to
+ the 'parse' method, which is more complicated from the usual point of
+ usage:
+
+ my $csv = Text::CSV_XS->new ({ binary => 1, eol => $/ });
+ while (<>) { # WRONG!
+ $csv->parse ($_);
+ my @fields = $csv->fields ();
+
+ will break, as the while might read broken lines, as that does not care
+ about the quoting. If you need to support embedded newlines, the way to
+ go is either
+
+ my $csv = Text::CSV_XS->new ({ binary => 1, eol => $/ });
+ while (my $row = $csv->getline (*ARGV)) {
+ my @fields = @$row;
+
+ or, more safely in perl 5.6 and up
+
+ my $csv = Text::CSV_XS->new ({ binary => 1, eol => $/ });
+ open my $io, "<", $file or die "$file: $!";
+ while (my $row = $csv->getline ($io)) {
+ my @fields = @$row;
+
+Unicode (UTF8)
+ On parsing (both for 'getline' and 'parse'), if the source is marked
+ being UTF8, then all fields that are marked binary will also be be
+ marked UTF8.
+
+ For complete control over encoding, please use Text::CSV::Encoded:
+
+ use Text::CSV::Encoded;
+ my $csv = Text::CSV::Encoded->new ({
+ encoding_in => "iso-8859-1", # the encoding comes into Perl
+ encoding_out => "cp1252", # the encoding comes out of Perl
+ });
+
+ $csv = Text::CSV::Encoded->new ({ encoding => "utf8" });
+ # combine () and print () accept *literally* utf8 encoded data
+ # parse () and getline () return *literally* utf8 encoded data
+
+ $csv = Text::CSV::Encoded->new ({ encoding => undef }); # default
+ # combine () and print () accept UTF8 marked data
+ # parse () and getline () return UTF8 marked data
+
+ On combining ('print' and 'combine'), if any of the combining fields
+ was marked UTF8, the resulting string will be marked UTF8. Note however
+ that all fields 'before' the first field that was marked UTF8 and
+ contained 8-bit characters that were not upgraded to UTF8, these will
+ be bytes in the resulting string too, causing errors. If you pass data
+ of different encoding, or you don't know if there is different
+ encoding, force it to be upgraded before you pass them on:
-Alan Citterman
participants (1)
-
root@hilbert.suse.de