develooper Front page | perl.perl5.porters | Postings from January 2001

Re: [PATCH: perl@8531] EBCDIC branch for pragma/sub-lval.t

Thread Previous | Thread Next
From:
Stephen McCamant
Date:
January 26, 2001 18:32
Subject:
Re: [PATCH: perl@8531] EBCDIC branch for pragma/sub-lval.t
Message ID:
14962.12826.7623.488906@soda.csua.berkeley.edu
>>>>> "PvhP" == Peter Prymmer <pvhp@forte.com> writes:

PvhP> Enjoy,

PvhP> --- t/pragma/sub_lval.t.orig	Fri Jan 26 15:47:03 2001
PvhP> +++ t/pragma/sub_lval.t	Fri Jan 26 15:56:00 2001
PvhP> @@ -514,7 +514,12 @@
 
PvhP>  $str = "Made w/ JavaScript";
PvhP>  sub veclv : lvalue { vec($str, 2, 32) }
PvhP> -veclv() = 0x5065726C;
PvhP> +if (ord('A') != 193) {
PvhP> +    veclv() = 0x5065726C;
PvhP> +}
PvhP> +else { # EBCDIC?
PvhP> +    veclv() = 0xD7859993;
PvhP> +}
PvhP>  print "# $str\nnot " unless $str eq "Made w/ PerlScript";
PvhP>  print "ok 62\n";

Serves me right for trying to be cute :-). The test doesn't really
need to be character-set dependent though; it might be better to just
change the line in question to

veclv() = unpack("N", "Perl");

(and ruin the surprise).

 -- Stephen McC




Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About