r57339 - in /trunk/libtext-csv-encoded-perl: ./ debian/ lib/Text/CSV/ lib/Text/CSV/Encoded/Coder/ t/ t/tests/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sun May 2 16:49:02 UTC 2010
Author: gregoa
Date: Sun May 2 16:48:54 2010
New Revision: 57339
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=57339
Log:
New upstream release.
Added:
trunk/libtext-csv-encoded-perl/t/pp_07_coder_check_value.t
- copied unchanged from r57338, branches/upstream/libtext-csv-encoded-perl/current/t/pp_07_coder_check_value.t
trunk/libtext-csv-encoded-perl/t/tests/07_coder_check_value_euc-jp.t
- copied unchanged from r57338, branches/upstream/libtext-csv-encoded-perl/current/t/tests/07_coder_check_value_euc-jp.t
Modified:
trunk/libtext-csv-encoded-perl/Changes
trunk/libtext-csv-encoded-perl/MANIFEST
trunk/libtext-csv-encoded-perl/META.yml
trunk/libtext-csv-encoded-perl/Makefile.PL
trunk/libtext-csv-encoded-perl/README
trunk/libtext-csv-encoded-perl/debian/changelog
trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded.pm
trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Base.pm
trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Encode.pm
trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/EncodeGuess.pm
Modified: trunk/libtext-csv-encoded-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/Changes?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/Changes (original)
+++ trunk/libtext-csv-encoded-perl/Changes Sun May 2 16:48:54 2010
@@ -1,4 +1,10 @@
Revision history for Perl extension Text::CSV::Encoded.
+
+0.10 Mon Apr 26 17:41:12 2010
+ [Text::CSV::Encoded::Coder::*]
+ - coder class can accept check value.
+ ex. $csv->coder->encode_check_value( Encode::FB_PERLQQ );
+ $csv->coder->decode_check_value( Encode::FB_PERLQQ );
0.09 Fri Oct 9 16:56:43 2009
- requires Text::CSV 1.12 or later.
Modified: trunk/libtext-csv-encoded-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/MANIFEST?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/MANIFEST (original)
+++ trunk/libtext-csv-encoded-perl/MANIFEST Sun May 2 16:48:54 2010
@@ -1,38 +1,33 @@
Changes
-Makefile.PL
-MANIFEST
-README
-
lib/Text/CSV/Encoded.pm
lib/Text/CSV/Encoded/Coder/Base.pm
lib/Text/CSV/Encoded/Coder/Encode.pm
lib/Text/CSV/Encoded/Coder/EncodeGuess.pm
-
-t/00_pod.t Check if pod is valid
-t/01_use.t
-t/02_undef.t
-t/03_attr_err.t
-
+Makefile.PL
+MANIFEST
+META.yml Module meta-data (added by MakeMaker)
+README
+sample/sjis.csv
+sample/utf8.csv
+t/00_pod.t Check if pod is valid
+t/01_use.t
+t/02_undef.t
+t/03_attr_err.t
+t/_setup.pm
t/pp_01_base.t
t/pp_02_code.t
t/pp_03_file.t
t/pp_04_uni_but_utf8.t
t/pp_05_guess.t
t/pp_06_coder_class.t
-t/xs_01_base.t
-t/xs_02_code.t
-t/xs_03_file.t
-
+t/pp_07_coder_check_value.t
t/tests/01_base.t
t/tests/02_code.t
t/tests/03_file.t
t/tests/04_uni_but_utf8.t
t/tests/05_guess.t
t/tests/06_coder_class.t
-
-t/_setup.pm
-
-sample/sjis.csv
-sample/utf8.csv
-
-META.yml Module meta-data (added by MakeMaker)
+t/tests/07_coder_check_value_euc-jp.t
+t/xs_01_base.t
+t/xs_02_code.t
+t/xs_03_file.t
Modified: trunk/libtext-csv-encoded-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/META.yml?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/META.yml (original)
+++ trunk/libtext-csv-encoded-perl/META.yml Sun May 2 16:48:54 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Text-CSV-Encoded
-version: 0.09
+version: 0.10
abstract: Encoding aware Text::CSV.
author:
- Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>
@@ -8,16 +8,20 @@
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
IO::Handle: 0
Test::Harness: 0
Test::More: 0
Text::CSV: 1.12
+resources:
+ repository: http://github.com/makamaka/Text-CSV-Encoded
no_index:
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.48
+generated_by: ExtUtils::MakeMaker version 6.54
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Modified: trunk/libtext-csv-encoded-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/Makefile.PL?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/Makefile.PL (original)
+++ trunk/libtext-csv-encoded-perl/Makefile.PL Sun May 2 16:48:54 2010
@@ -18,5 +18,14 @@
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/Text/CSV/Encoded.pm', # retrieve abstract from module
AUTHOR => 'Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>') : ()),
+
( $ExtUtils::MakeMaker::VERSION >= 6.3002 ? ('LICENSE' => 'perl', ) : () ),
+
+ ( $ExtUtils::MakeMaker::VERSION >= 6.46 ? (
+ 'META_MERGE' => {
+ resources => {
+ repository => 'http://github.com/makamaka/Text-CSV-Encoded',
+ },
+ } ) : ()
+ ),
);
Modified: trunk/libtext-csv-encoded-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/README?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/README (original)
+++ trunk/libtext-csv-encoded-perl/README Sun May 2 16:48:54 2010
@@ -1,7 +1,7 @@
Text::CSV::Encoded
========================
-Encoding aware Text::CSV
+encoding-handling Text::CSV
INSTALLATION
Modified: trunk/libtext-csv-encoded-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/debian/changelog?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/debian/changelog (original)
+++ trunk/libtext-csv-encoded-perl/debian/changelog Sun May 2 16:48:54 2010
@@ -1,3 +1,9 @@
+libtext-csv-encoded-perl (0.10-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org> Sun, 02 May 2010 18:47:17 +0200
+
libtext-csv-encoded-perl (0.09-1) unstable; urgency=low
* Initial Release. (Closes: #576763)
Modified: trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded.pm?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded.pm (original)
+++ trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded.pm Sun May 2 16:48:54 2010
@@ -4,7 +4,7 @@
use vars qw( $VERSION );
use Carp ();
-$VERSION = '0.09';
+$VERSION = '0.10';
BEGIN {
require Text::CSV;
@@ -290,6 +290,10 @@
$uni_columns = $csv->decode( 'euc-jp', $line ); # euc-jp => unicode
$line = $csv->encode( 'euc-jp', $uni_columns ); # unicode => euc-jp
+ # pass check value to coder class
+ $csv->coder->encode_check_value( Encode::FB_PERLQQ );
+
+
=head1 DESCRIPTION
This module inherits L<Text::CSV> and is aware of input/output encodings.
@@ -627,7 +631,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright 2008-2009 by Makamaka Hannyaharamitu
+Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Base.pm?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Base.pm (original)
+++ trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Base.pm Sun May 2 16:48:54 2010
@@ -3,7 +3,7 @@
use strict;
BEGIN {
- $Text::CSV::Encoded::Coder::Base::VERSION = '0.01';
+ $Text::CSV::Encoded::Coder::Base::VERSION = '0.02';
}
sub new {
@@ -37,6 +37,18 @@
}
+sub encode_check_value {
+ $_[0]->{ encode_check_value } = $_[1] if @_ > 1;
+ $_[0]->{ encode_check_value } || 0;
+}
+
+
+sub decode_check_value {
+ $_[0]->{ decode_check_value } = $_[1] if @_ > 1;
+ $_[0]->{ decode_check_value } || 0;
+}
+
+
1;
__END__
@@ -120,6 +132,18 @@
In Perl 5.8 or later, it is expected to do C<utf8::upgrade> against $str.
In older versions, this method may be meaningless and there is no need to implement.
See to L<utf8>.
+
+=head2 encode_check_value
+
+Setter/Getter for an argument passing to encode.
+
+ $coder->encode_check_value( Encode::FB_PERLQQ );
+
+=head2 decode_check_value
+
+Setter/Getter for an argument passing to decode.
+
+ $coder->encode_check_value( Encode::FB_PERLQQ );
=head1 EXAMPLE
@@ -179,7 +203,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright 2008 by Makamaka Hannyaharamitu
+Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Encode.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Encode.pm?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Encode.pm (original)
+++ trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/Encode.pm Sun May 2 16:48:54 2010
@@ -9,7 +9,7 @@
use Carp ();
use Encode ();
-our $VERSION = '0.03';
+our $VERSION = '0.04';
my %EncoderCache;
@@ -22,14 +22,14 @@
sub encode {
my ( $self, $encoding, $str ) = @_;
return undef unless defined $str;
- $self->find_encoding( $encoding )->encode( $str );
+ $self->find_encoding( $encoding )->encode( $str, $self->encode_check_value );
}
sub decode {
my ( $self, $encoding, $str ) = @_;
return undef unless defined $str;
- $self->find_encoding( $encoding )->decode( $str );
+ $self->find_encoding( $encoding )->decode( $str, $self->decode_check_value );
}
@@ -37,7 +37,7 @@
my ( $self, $encoding, $arrayref ) = @_;
my $enc = $self->find_encoding( $encoding ) || return;
for ( @$arrayref ) {
- $_ = $enc->decode( $_ ) if defined $_;
+ $_ = $enc->decode( $_, $self->decode_check_value ) if defined $_;
}
}
@@ -46,7 +46,7 @@
my ( $self, $encoding, $arrayref ) = @_;
my $enc = $self->find_encoding( $encoding ) || return;
for ( @$arrayref ) {
- $_ = $enc->encode( $_ ) if defined $_;
+ $_ = $enc->encode( $_, $self->encode_check_value ) if defined $_;
}
}
@@ -87,7 +87,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright 2008-2009 by Makamaka Hannyaharamitu
+Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/EncodeGuess.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/EncodeGuess.pm?rev=57339&op=diff
==============================================================================
--- trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/EncodeGuess.pm (original)
+++ trunk/libtext-csv-encoded-perl/lib/Text/CSV/Encoded/Coder/EncodeGuess.pm Sun May 2 16:48:54 2010
@@ -10,7 +10,7 @@
use Encode ();
use Encode::Guess;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
sub decode {
@@ -21,10 +21,10 @@
if ( ref $encoding ) {
my $enc = Encode::Guess::guess_encoding( $str, @$encoding );
$enc = $self->find_encoding( $encoding->[0] ) unless ref $enc;
- return $enc->decode( $str );
+ return $enc->decode( $str, $self->decode_check_value );
}
- $self->find_encoding( $encoding )->decode( $str );
+ $self->find_encoding( $encoding )->decode( $str, $self->decode_check_value );
}
@@ -35,13 +35,13 @@
for ( @$arrayref ) {
my $enc = Encode::Guess::guess_encoding( $_, @$encoding );
$enc = $self->find_encoding( $encoding->[0] ) unless ref $enc;
- $_ = $enc->decode( $_ );
+ $_ = $enc->decode( $_, $self->decode_check_value );
}
}
else {
my $enc = $self->find_encoding( $encoding ) || return;
for ( @$arrayref ) {
- $_ = $enc->decode( $_ );
+ $_ = $enc->decode( $_, $self->decode_check_value );
}
}
@@ -128,7 +128,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright 2008 by Makamaka Hannyaharamitu
+Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
More information about the Pkg-perl-cvs-commits
mailing list