Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 23725
Status: rejected
Priority: 0/
Queue: Encode

Owner: Nobody in particular
Requestors: dmuey [...]

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)

Subject: Make installable on Perls older than 5.7.3
Removing the version restrictions in all the .pm's results in: [root Encode-2.18]# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Encode::Byte Writing Makefile for Encode::CN Writing Makefile for Encode::EBCDIC Writing Makefile for Encode::JP Writing Makefile for Encode::KR Writing Makefile for Encode::Symbol Writing Makefile for Encode::TW Writing Makefile for Encode::Unicode Writing Makefile for Encode [root Encode-2.18]# [root@hypercube (a) Encode-2.18]# make ... /usr/bin/perl ../bin/enc2xs -"Q" -"O" -o byte_t.c -f byte_t.fnm Constant name 'HASH(0x809d028)' has invalid characters at ../bin/enc2xs line 19 BEGIN failed--compilation aborted at ../bin/enc2xs line 31. .. Doing this makes that go way: [root@hypercube (a) Encode-2.18]# diff -u bin/enc2xs bin/enc2xs.orig --- bin/enc2xs.orig Thu Nov 30 11:35:32 2006 +++ bin/enc2xs Thu Nov 30 11:43:50 2006 @@ -15,20 +15,19 @@ # RAW is a do_now as inserted by &enter # AGG is an aggreagated do_now, as built up by &process -use constant { - RAW_NEXT => 0, - RAW_IN_LEN => 1, - RAW_OUT_BYTES => 2, - RAW_FALLBACK => 3, +use constant RAW_NEXT => 0; +use constant RAW_IN_LEN => 1; +use constant RAW_OUT_BYTES => 2; +use constant RAW_FALLBACK => 3; + +use constant AGG_MIN_IN => 0; +use constant AGG_MAX_IN =>1; +use constant AGG_OUT_BYTES => 2; +use constant AGG_NEXT => 3; +use constant AGG_IN_LEN => 4; +use constant AGG_OUT_LEN => 5; +use constant AGG_FALLBACK => 6; - AGG_MIN_IN => 0, - AGG_MAX_IN => 1, - AGG_OUT_BYTES => 2, - AGG_NEXT => 3, - AGG_IN_LEN => 4, - AGG_OUT_LEN => 5, - AGG_FALLBACK => 6, -}; # (See the algorithm in encengine.c - we're building structures for it) [root Encode-2.18]# Then `make` does: /usr/bin/perl ../bin/enc2xs -"Q" -"O" -o byte_t.c -f byte_t.fnm Reading iso-8859-2 (iso-8859-2) Undefined subroutine &utf8::unicode_to_native called at ../bin/enc2xs line 86, <E> line 12. Adding this to the top od bin/enc2xs makes the undefined subroutine errors go away: use utf8; if(!defined &utf8::unicode_to_native) { sub utf8::unicode_to_native { return @_; } } if(!defined &utf8::encode) { sub utf8::encode { return @_; } } Even though it gets much farther it dies here: cc -c -I./Encode -DDEBUGGING -fno-strict-aliasing -D_LARGEFILE_SOURCE - D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"2.18\" -DXS_VERSION=\"2.18\" -fpic "-I/ usr/lib/perl5/5.6.2/i686-linux/CORE" Encode.c Encode.xs: In function `encode_method': Encode.xs:213: error: parse error before "UVXf" Encode.xs:220: error: parse error before "UVXf" Encode.xs:231: error: parse error before "UVXf" Encode.xs: In function `process_utf8': Encode.xs:335: error: `PERL_UNICODE_MAX' undeclared (first use in this function) Encode.xs:335: error: (Each undeclared identifier is reported only once Encode.xs:335: error: for each function it appears in.) Encode.xs:366: error: parse error before "UVXf" Encode.xs:366: error: `UVXf' undeclared (first use in this function) Encode.xs:374: error: parse error before "UVXf" Encode.xs:380: error: parse error before "UVXf" make: *** [Encode.o] Error 1 That where I'm at so far :) Any input is appreciated!
Download (untitled) / with headers
text/plain 840b
ERROR: Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at /usr/lib/perl5/site_perl/5.6.2/.... SOLUTION: or put 'use utf8;' in the pakage that is calling utf8::encode via its full name space: [root ]# perl -Mstrict -wle 'my $t = pack "U0A*", "Dan";print uc($t);sub x { 123; }' DAN [root]# perl -Mstrict -wle 'use utf8;my $t = pack "U0A*", "Dan";print uc($t);sub x { encode (123)}' DAN [root]# perl -Mstrict -wle 'my $t = pack "U0A*", "Dan";print uc($t);sub x { utf8::encode(123)}' Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at -e line 1. [roo]# perl -Mstrict -wle 'use utf8;my $t = pack "U0A*", "Dan";print uc($t);sub x { utf8::encode(123)}' DAN [root]#
Download (untitled) / with headers
text/plain 306b
DMUEY, Thank you for your report and my apology for not responding promptly. And my apology for not accepting your patch; Perl 5.7.3 is an experimental version and I have no intention to support it. So the minimum version of Encode remains 5.7.3 (5.8.1 for full features). Dan the Encode Maintainer

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to