From: Andreas Koenig Date: Wed, 23 Apr 1997 08:47:00 +0000 (+0200) Subject: Don't put leading newline on numeric strings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c1b0f331869f7723157d603165e544a78c1a6206;p=p5sagit%2Fp5-mst-13.2.git Don't put leading newline on numeric strings Subject: NeXT fails one test due to atoi pragme/constants has a test that does the equivalent of: print " \t\n1234" == 1234 ? "ok" : "not ok"; This test prints "not ok" on the NeXT. Here's some background how the NeXT behaves with several leading whitespaces. koenig@franz:/M/extra/sources/perl/perl5.003_97% perl -le ' print " \t\n1234" == 1234 ? "ok" : "not ok"; print " 1234" == 1234 ? "ok" : "not ok"; print "\t1234" == 1234 ? "ok" : "not ok"; print "\n1234" == 1234 ? "ok" : "not ok"; ' not ok ok ok not ok I'd recommend the following patch: p5p-msgid: 199704230847.KAA22752@anna.in-berlin.de --- diff --git a/t/pragma/constant.t b/t/pragma/constant.t index fdd08b8..0095f3b 100755 --- a/t/pragma/constant.t +++ b/t/pragma/constant.t @@ -104,9 +104,9 @@ use constant TRAILING => '12 cats'; } test 25, TRAILING eq '12 cats'; -use constant LEADING => " \t\n1234"; +use constant LEADING => " \t1234"; test 26, LEADING == 1234; -test 27, LEADING eq " \t\n1234"; +test 27, LEADING eq " \t1234"; use constant ZERO1 => 0; use constant ZERO2 => 0.0;