nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

string overload broken since 5.18: t/CORE/op/length.t #373

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
With 5.18 t/CORE/op/length.t test 27 started to fail:

{
    package U;
    use overload '""' => sub {return undef;};
}

my $uo = bless [], 'U';
my $expected = $] < 5.018 ? undef : 0;
is(length($uo), $expected, "Length of string overloaded reference");

=> length($uo) = 18 since 5.18. Ok < 5.18

Note quite related to #335

Original issue reported on code.google.com by reini.urban on 27 Aug 2014 at 1:24

GoogleCodeExporter commented 9 years ago

Original comment by reini.urban on 27 Aug 2014 at 1:24

GoogleCodeExporter commented 9 years ago
We can also use the original testcase #172

    $ t/testc.sh 172

Original comment by reini.urban on 31 Aug 2014 at 7:24