At 05:30 PM 6/15/2003 +0000, Josts Smokehouse wrote:

[snip]


PERL_DL_NONLAZY=1 /usr/local/perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/Test/Tech/tech.t
t/Test/Tech/tech....Illegal character in prototype for Test::Tech::skip_rest : $value at /net/sunu991/disc1/.cpanplus/5.8.0/build/Test-Tech-0.02/lib/Test/Tech.pm line 84.
Illegal character in prototype for Test::Tech::skip_rest : $value at /net/sunu991/disc1/.cpanplus/5.8.0/build/Test-Tech-0.02/blib/lib/Test/Tech.pm line 84.
# Test 4 got: '$VAR1 = '

[snip]

 => my $x = 2
 => my $y = 3
 => $x + $y
 5
 
 => ($x+$y,$y-$x)
 5
 1

[snip]


' (t/Test/Tech/tech.t at line 123)
#   Expected: '$VAR1 = '
 

[snip]

 ~~~~~~ The demonstration follows ~~~~~

 => my $x = 2
 => my $y = 3
 => $x + $y
 \'5\'
 
 => ($x+$y,$y-$x)
 \'5\'
 \'1\'

[snip]

The initial analysis is that the cause of the failure is  probably that different
versions of Perl on different operating systems produce different results
for the below:

use Data::Dumper
my $probe = 3;
Dumper([0+$probe]);

The results will be either a stringified number, 3, or a string, '3'.
The list of these differences in Perl are as follows:

   string - Perl v5.6.1 MSWin32-x86-multi-thread, ActiveState build 631, binary
   number - Perl version 5.008 for solaris 

The Perl's that return a string may be mutants that need to be hunted
down and killed because they may not in compliance with the
following:

 Wall, Christiansen and Orwant on Perl internal storage

 Page 351 of Programming Perl, Third Addition, Overloadable Operators
 quote:
 
 Conversion operators: "", 0+, bool
  These three keys let you provide behaviors for Perl's automatic conversions
   to strings, numbers, and Boolean values, respectively.

Correction action was taken to deal with the different Perls in the wild
by adding a probe to determine which type of Perl the test script is running
under and adjusting the test script for that Perl

For further details see

http://packages.softwarediamonds.com

http://www.softwarediamonds/packages/Test-Tech-0.03.html

http://www.perl.com/CPAN-local/authors/id/S/SO/SOFTDIA/Test-Tech-0.03.readme

Regards,
Samson Monaco Tutankhamen

Reply via email to