Re: [tcltk-perl] What version of perl is required?
Brought to you by:
hobbs
From: Gisle A. <gi...@Ac...> - 2004-04-14 10:02:50
|
"Konovalov, Vadim" <vko...@sp...> writes: > > Apparently the code works with perl-5.6 and better, and fails with > > perl-5.005. Is this what is expected? I ask because I was looking > > into suggesting cleanups for the perl code, but was not sure which > > perl's you try to stay portabe to. > > > > If perl-5.6 is the baseline, then it is a good idea to put a: > > > > require 5.006; > > At some moment I managed things to work with 5.005_03, and, to be honest, > not very glad for 'Tcl' perl module to require 5.8.0. Agree. perl-5.6 is very much alive. I'm not sure how many still are stuck with 5.005 though. I would suggest that perl-5.6 is made a requirement. > 5.6.1 compatibility could be approached however, but we must decide whether > elder than 5.6.0 are supported. > Could you please point out what is broken? This patch is needed to get Tcl to build and have a clean 'make test' on perl5.005_04-RC1: ==== //depot/users/gisle/hacks/Tcl/Tcl.xs#3 - /home/gisle/hacks/Tcl/Tcl.xs ==== Index: users/gisle/hacks/Tcl/Tcl.xs --- users/gisle/hacks/Tcl/Tcl.xs.~1~ Wed Apr 14 11:58:30 2004 +++ users/gisle/hacks/Tcl/Tcl.xs Wed Apr 14 11:58:30 2004 @@ -15,6 +15,17 @@ #include "perl.h" #include "XSUB.h" +#ifndef dTHX + #define dTHX ; + #define pTHX_ + #define aTHX_ +#endif + +#ifndef SvPV_nolen + STRLEN my_na; + #define SvPV_nolen(str) SvPV(str, my_na) +#endif + #ifndef DEBUG_REFCOUNTS #define DEBUG_REFCOUNTS 0 #endif @@ -136,9 +147,11 @@ str = Tcl_GetStringFromObj(objPtr, &len); sv = newSVpvn(str, len); /* should turn on, but let's check this first for efficiency */ +#ifdef SvUTF8_on if (len && has_highbit(str, len)) { SvUTF8_on(sv); } +#endif } return sv; } ==== //depot/users/gisle/hacks/Tcl/t/var.t#2 - /home/gisle/hacks/Tcl/t/var.t ==== Index: users/gisle/hacks/Tcl/t/var.t --- users/gisle/hacks/Tcl/t/var.t.~1~ Wed Apr 14 11:58:30 2004 +++ users/gisle/hacks/Tcl/t/var.t Wed Apr 14 11:58:30 2004 @@ -41,6 +41,7 @@ # some Unicode tests if ($]>=5.006 && $i->GetVar("tcl_version")>=8.1) { +eval <<'EOT'; die $@ if $@; $i->SetVar("univar","\x{abcd}\x{1234}"); if ($i->GetVar("univar") ne "\x{abcd}\x{1234}") { print "not "; @@ -55,6 +56,7 @@ print "ok 8 # Unicode persistence for tied variable\n"; binmode(STDOUT, ":utf8") if $] >= 5.008; print "# $r\n"; +EOT } else { for (7..8) {print "ok $_ # skipped: not Unicode-aware Perl or Tcl\n";} End of Patch. |