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!