From 5906ba25a218417a51bdcf675e3ae12ac8547a172d64a41efb736b04746f945a Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 31 Mar 2011 13:23:18 +0000 Subject: [PATCH 1/2] Updating link to change in openSUSE:Factory/perl-Text-CSV_XS revision 18.0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Text-CSV_XS?expand=0&rev=087cf9c6b7c142147b31bba7581e7683 --- perl-Text-CSV_XS.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/perl-Text-CSV_XS.spec b/perl-Text-CSV_XS.spec index 17c7dfc..ee3aa28 100644 --- a/perl-Text-CSV_XS.spec +++ b/perl-Text-CSV_XS.spec @@ -1,7 +1,7 @@ # -# spec file for package perl-Text-CSV_XS (Version 0.81) +# 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,6 +15,8 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: perl-Text-CSV_XS Version: 0.81 Release: 1 From f3713e4cd300f021928c18a5cf85cb6ee1d3f2412f96c53035228768d513eefe Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 16 May 2011 08:55:15 +0000 Subject: [PATCH 2/2] - updated to 0.82 * Doc fix (RT#66905, Peter Newman) * Documentation overhaul (pod links) OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Text-CSV_XS?expand=0&rev=16 --- Text-CSV_XS-0.81.tgz | 3 -- Text-CSV_XS-0.82.tgz | 3 ++ perl-Text-CSV_XS.changes | 7 ++++ perl-Text-CSV_XS.spec | 82 +++------------------------------------- 4 files changed, 16 insertions(+), 79 deletions(-) delete mode 100644 Text-CSV_XS-0.81.tgz create mode 100644 Text-CSV_XS-0.82.tgz diff --git a/Text-CSV_XS-0.81.tgz b/Text-CSV_XS-0.81.tgz deleted file mode 100644 index 0a0c1e9..0000000 --- a/Text-CSV_XS-0.81.tgz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:678ff0d37eec7d8954ba4e37a9ee8be7222bd9312d4e0bdc6890780bc72cf791 -size 112866 diff --git a/Text-CSV_XS-0.82.tgz b/Text-CSV_XS-0.82.tgz new file mode 100644 index 0000000..f8cb489 --- /dev/null +++ b/Text-CSV_XS-0.82.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a4000b37efa2b6fc18e1464b4bb139ae85bc6f3ab832b009f9cc9009ec6999b +size 113305 diff --git a/perl-Text-CSV_XS.changes b/perl-Text-CSV_XS.changes index 95c853f..e137f43 100644 --- a/perl-Text-CSV_XS.changes +++ b/perl-Text-CSV_XS.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon May 16 08:47:46 UTC 2011 - coolo@opensuse.org + +- updated to 0.82 + * Doc fix (RT#66905, Peter Newman) + * Documentation overhaul (pod links) + ------------------------------------------------------------------- Thu Mar 31 08:45:11 UTC 2011 - coolo@novell.com diff --git a/perl-Text-CSV_XS.spec b/perl-Text-CSV_XS.spec index ee3aa28..c68af85 100644 --- a/perl-Text-CSV_XS.spec +++ b/perl-Text-CSV_XS.spec @@ -1,5 +1,5 @@ # -# spec file for package perl-Text-CSV_XS +# spec file for package perl-Text-CSV_XS (Version 0.82) # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -15,26 +15,18 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: perl-Text-CSV_XS -Version: 0.81 +Version: 0.82 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 -#Source: http://www.cpan.org/authors/id/H/HM/HMBRAND/Text-CSV_XS-%{version}.tgz -Source: %{cpan_name}-%{version}.tgz +Source: http://www.cpan.org/authors/id/H/HM/HMBRAND/%{cpan_name}-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros -BuildRequires: perl(Config) -BuildRequires: perl(DynaLoader) -BuildRequires: perl(IO::Handle) -Requires: perl(DynaLoader) -Requires: perl(IO::Handle) %{perl_requires} %description @@ -46,71 +38,9 @@ The module accepts either strings or files as input and can utilize any user-specified characters as delimiters, separators, and escapes so it is perhaps better called ASV (anything separated values) rather than just CSV. -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: - - $csv->print ($fh, [ map { utf8::upgrade (my $x = $_); $x } @data ]); - %prep %setup -q -n %{cpan_name}-%{version} +find . -type f -print0 | xargs -0 chmod 644 %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" @@ -128,7 +58,7 @@ Unicode (UTF8) %{__rm} -rf %{buildroot} %files -f %{name}.files -%defattr(644,root,root,755) -%doc ChangeLog README +%defattr(-,root,root,755) +%doc ChangeLog examples README %changelog