'Encode' => {
'MAINTAINER' => 'dankogai',
- 'DISTRIBUTION' => 'DANKOGAI/Encode-2.47.tar.gz',
+ 'DISTRIBUTION' => 'DANKOGAI/Encode-2.48.tar.gz',
'FILES' => q[cpan/Encode],
'UPSTREAM' => 'cpan',
},
# Revision history for Perl extension Encode.
#
-# $Id: Changes,v 2.47 2012/08/15 05:36:16 dankogai Exp dankogai $
+# $Id: Changes,v 2.48 2013/02/18 02:23:56 dankogai Exp dankogai $
#
-$Revision: 2.47 $ $Date: 2012/08/15 05:36:16 $
+$Revision: 2.48 $ $Date: 2013/02/18 02:23:56 $
+! encoding.pm
+ t/Mod_EUCJP.pm t/enc_data.t t/enc_eucjp.t t/enc_module.t t/enc_utf8.t
+ t/encoding.t t/jperl.t
+ [PATCH] Deprecate encoding.pm
+ https://rt.cpan.org/Ticket/Display.html?id=81255
+! Encode/Supported.pod
+ Fixed: Pod errors
+ https://rt.cpan.org/Ticket/Display.html?id=81426
+! Encode.pm t/Encode.t
+ [PATCH] Fix for shared hash key scalars
+ https://rt.cpan.org/Ticket/Display.html?id=80608
+! Encode.pm
+ Fixed: Uninitialized value warning from Encode->encodings()
+ https://rt.cpan.org/Ticket/Display.html?id=80181
+! Makefile.PL
+ Install to 'site' instead of 'perl' when perl version is 5.11+
+ https://rt.cpan.org/Ticket/Display.html?id=78917
+! Encode/Makefile_PL.e2x
+ find enc2xs.bat if it works on windows.
+ https://github.com/dankogai/p5-encode/pull/7
+! t/piconv.t
+ Fix finding piconv in t/piconv.t
+ https://github.com/dankogai/p5-encode/pull/6
+
+2.47 2012/08/15 05:36:16
! Encode.pm
POD Fixes: Copyright and mail address
! Makefile.PL
#
-# $Id: Encode.pm,v 2.47 2012/08/15 05:36:16 dankogai Exp dankogai $
+# $Id: Encode.pm,v 2.48 2013/02/18 02:23:56 dankogai Exp dankogai $
#
package Encode;
use strict;
use warnings;
-our $VERSION = sprintf "%d.%02d", q$Revision: 2.47 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%02d", q$Revision: 2.48 $ =~ /(\d+)/g;
use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG};
use XSLoader ();
XSLoader::load( __PACKAGE__, $VERSION );
sub encodings {
my %enc;
- if ( @_ and $_[1] eq ":all" ) {
+ my $arg = $_[1] || '';
+ if ( $arg eq ":all" ) {
%enc = ( %Encoding, %ExtModule );
}
else {
sub encode($$;$) {
my ( $name, $string, $check ) = @_;
return undef unless defined $string;
- $string .= '' if ref $string; # stringify;
+ $string .= ''; # stringify;
$check ||= 0;
unless ( defined $name ) {
require Carp;
sub decode($$;$) {
my ( $name, $octets, $check ) = @_;
return undef unless defined $octets;
- $octets .= '' if ref $octets;
+ $octets .= '';
$check ||= 0;
my $enc = find_encoding($name);
unless ( defined $enc ) {
Encode::LEAVE_SRC
If the C<Encode::LEAVE_SRC> bit is I<not> set but I<CHECK> is set, then the
-second argument to encode() or decode() will be overwritten in place.
+source string to encode() or decode() will be overwritten in place.
If you're not interested in this, then bitwise-OR it with the bitmask.
=head2 coderef for CHECK
#### DO NOT EDIT BEYOND THIS POINT!
require File::Spec;
my ($enc2xs, $encode_h) = ();
+my @path_ext = ('');
+@path_ext = split(';', $ENV{PATHEXT}) if $^O eq 'MSWin32';
PATHLOOP:
for my $d (@Config{qw/bin sitebin vendorbin/},
(split /$Config{path_sep}/o, $ENV{PATH})){
for my $f (qw/enc2xs enc2xs5.7.3/){
my $path = File::Spec->catfile($d, $f);
- -r $path and $enc2xs = $path and last PATHLOOP;
+ for my $ext (@path_ext) {
+ my $bin = "$path$ext";
+ -r "$bin" and $enc2xs = $bin and last PATHLOOP;
+ }
}
}
$enc2xs or die "enc2xs not found!";
"unknown"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120921",
+ "generated_by" : "ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter version 2.120921",
"license" : [
"perl_5"
],
}
},
"release_status" : "stable",
- "version" : "2.47"
+ "version" : "2.48"
}
configure_requires:
ExtUtils::MakeMaker: 0
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120921'
+generated_by: 'ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter version 2.120921'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- t
- inc
requires: {}
-version: 2.47
+version: 2.48
#
-# $Id: Makefile.PL,v 2.9 2012/08/15 05:36:16 dankogai Exp dankogai $
+# $Id: Makefile.PL,v 2.10 2013/02/18 02:23:56 dankogai Exp dankogai $
#
use 5.007003;
use strict;
INC => '-I' . File::Spec->catfile( '.', 'Encode' ),
LICENSE => 'perl',
PMLIBDIRS => \@pmlibdirs,
- INSTALLDIRS => 'perl',
+ INSTALLDIRS => ($] < 5.011 ? 'perl' : 'site'),
);
package MY;
-# $Id: encoding.pm,v 2.10 2012/08/05 23:08:49 dankogai Exp $
+# $Id: encoding.pm,v 2.11 2013/02/18 02:23:56 dankogai Exp dankogai $
package encoding;
our $VERSION = '2.6_01';
}
sub import {
+ if ($] >= 5.017) {
+ warnings::warnif("deprecated",
+ "Use of the encoding pragma is deprecated")
+ }
my $class = shift;
my $name = shift;
if (!$name){
encoding - allows you to write your script in non-ascii or non-utf8
+=head1 WARNING
+
+This module is deprecated under perl 5.18. It uses a mechanism provided by
+perl that is deprecated under 5.18 and higher, and may be removed in a
+future version.
+
=head1 SYNOPSIS
use encoding "greek"; # Perl like Greek to you?
#
-# $Id: GSM0338.pm,v 2.2 2012/08/15 05:36:16 dankogai Exp dankogai $
+# $Id: GSM0338.pm,v 2.2 2012/08/15 05:36:16 dankogai Exp $
#
package Encode::GSM0338;
see L<Encode::Unicode>.
UTF-7 is a special encoding which "re-encodes" UTF-16BE into a 7-bit
-encoding. It is implemented seperately by Encode::Unicode::UTF7.
+encoding. It is implemented separately by Encode::Unicode::UTF7.
=head2 Encode::Byte -- Extended ASCII
=item (Mac) Indic encodings
The maps for the following are available at L<http://www.unicode.org/>
-but remain unsupport because those encodings need algorithmical
+but remain unsupported because those encodings need an algorithmical
approach, currently unsupported by F<enc2xs>:
MacDevanagari
my @source = qw(ascii iso8859-1 cp1250);
my @destiny = qw(cp1047 cp37 posix-bc);
my @ebcdic_sets = qw(cp1047 cp37 posix-bc);
-plan test => 38+$n*@encodings + 2*@source*@destiny*@character_set + 2*@ebcdic_sets*256 + 6 + 2;
+plan test => 38+$n*@encodings + 2*@source*@destiny*@character_set + 2*@ebcdic_sets*256 + 6 + 4;
my $str = join('',map(chr($_),0x20..0x7E));
my $cpy = $str;
ok(length($str),from_to($cpy,'iso8859-1','Unicode'),"Length Wrong");
package main;
ok(decode(latin1 => Encode::Dummy->new("foobar")), "foobar");
ok(encode(utf8 => Encode::Dummy->new("foobar")), "foobar");
+
+# hash keys
+my $key = (keys %{{ "whatever\x{100}" => '' }})[0];
+my $kopy = $key;
+encode("UTF-16LE", $kopy, Encode::FB_CROAK);
+ok $key, "whatever\x{100}", 'encode with shared hash key scalars';
+undef $key;
+$key = (keys %{{ "whatever" => '' }})[0];
+$kopy = $key;
+decode("UTF-16LE", $kopy, Encode::FB_CROAK);
+ok $key, "whatever", 'decode with shared hash key scalars';
-# $Id: Mod_EUCJP.pm,v 2.0 2004/05/16 20:55:17 dankogai Exp $
+# $Id: Mod_EUCJP.pm,v 2.1 2013/02/18 02:23:56 dankogai Exp dankogai $
# This file is in euc-jp
package Mod_EUCJP;
+no warnings "deprecated";
use encoding "euc-jp";
sub new {
my $class = shift;
-# $Id: enc_data.t,v 2.1 2006/05/03 18:24:10 dankogai Exp $
+# $Id: enc_data.t,v 2.2 2013/02/18 02:23:56 dankogai Exp dankogai $
BEGIN {
require Config; import Config;
use strict;
+no warnings "deprecated";
use encoding 'euc-jp';
use Test::More tests => 4;
-# $Id: enc_eucjp.t,v 2.1 2006/05/03 18:24:10 dankogai Exp $
+# $Id: enc_eucjp.t,v 2.2 2013/02/18 02:23:56 dankogai Exp dankogai $
# This is the twin of enc_utf8.t .
BEGIN {
}
}
+no warnings "deprecated";
use encoding 'euc-jp';
my @c = (127, 128, 255, 256);
-# $Id: enc_module.t,v 2.1 2006/05/03 18:24:10 dankogai Exp $
+# $Id: enc_module.t,v 2.2 2013/02/18 02:23:56 dankogai Exp dankogai $
# This file is in euc-jp
BEGIN {
require Config; import Config;
}
use lib qw(t ext/Encode/t ../ext/Encode/t); # latter 2 for perl core
use Mod_EUCJP;
+no warnings "deprecated";
use encoding "euc-jp";
use Test::More tests => 3;
use File::Basename;
-# $Id: enc_utf8.t,v 2.1 2006/05/03 18:24:10 dankogai Exp $
+# $Id: enc_utf8.t,v 2.2 2013/02/18 02:23:56 dankogai Exp dankogai $
# This is the twin of enc_eucjp.t .
BEGIN {
}
}
+no warnings "deprecated";
use encoding 'utf8';
my @c = (127, 128, 255, 256);
print "1..31\n";
+no warnings "deprecated";
use encoding "latin1"; # ignored (overwritten by the next line)
use encoding "greek"; # iso 8859-7 (no "latin" alias, surprise...)
#
-# $Id: jperl.t,v 2.1 2006/05/03 18:24:10 dankogai Exp $
+# $Id: jperl.t,v 2.2 2013/02/18 02:23:56 dankogai Exp dankogai $
#
# This script is written in euc-jp
use Test::More tests => 15; # black magic tests commented out
my $Debug = shift;
+no warnings "deprecated";
no encoding; # ensure
my $Enamae = "\xbe\xae\xbb\xf4\x20\xc3\xc6"; # euc-jp, with \x escapes
use encoding "euc-jp";
#
-# $Id: piconv.t,v 0.3 2009/11/16 14:08:13 dankogai Exp $
+# $Id: piconv.t,v 0.4 2013/02/18 02:23:56 dankogai Exp dankogai $
#
BEGIN {
my $blib =
File::Spec->rel2abs(
- File::Spec->catdir( $FindBin::RealBin, File::Spec->updir, 'blib' ) );
-my $script = File::Spec->catdir($blib, 'script', 'piconv');
+ File::Spec->catdir( $FindBin::RealBin, File::Spec->updir ) );
+my $script = File::Spec->catdir($blib, 'bin', 'piconv');
my @base_cmd = ( $^X, "-Mblib=$blib", $script );
plan tests => 5;
SKIP: {
skip_if_miniperl("no dynamic loading on miniperl, no Encode", 1);
+skip('encoding pragma is deprecated', 1) if $] >= 5.017009;
fresh_perl_is <<'end', "ok\n", {},
use encoding 'utf8';
map { "a" . $a } ((1)x5000);