This is a patch that starts failing the test on Perl 5.8 (as it should,
IMHO)
*** dualvar.t Sat Dec 6 08:14:29 2014
--- dualvar.t~ Tue Feb 4 22:54:25 2014
***************
*** 39,61 ****
sub ok_iv
{
my ($var, $iv) = @_;
! ok($$var == $$iv, 'IV number preserved');
! ok($$var eq $$iv, 'String preserved');
}
sub ok_nv
{
my ($var, $nv) = @_;
! ok($$var == $$nv, 'NV number preserved');
! ok($$var eq $$nv, 'String preserved');
}
sub ok_uv
{
my ($var, $uv) = @_;
! ok($$var == $$uv, 'UV number preserved');
! ok($$var > 0, 'UV number preserved');
! ok($$var eq $$uv, 'String preserved');
}
### Start of Testing ###
--- 39,61 ----
sub ok_iv
{
my ($var, $iv) = @_;
! ok($var == $iv, 'IV number preserved');
! ok($var eq $iv, 'String preserved');
}
sub ok_nv
{
my ($var, $nv) = @_;
! ok($var == $nv, 'NV number preserved');
! ok($var eq $nv, 'String preserved');
}
sub ok_uv
{
my ($var, $uv) = @_;
! ok($var == $uv, 'UV number preserved');
! ok($var > 0, 'UV number preserved');
! ok($var eq $uv, 'String preserved');
}
### Start of Testing ###
***************
*** 71,79 ****
my $snv :shared = shared_clone($nv);
my $suv :shared = shared_clone($uv);
! ok_iv(\$siv, \$iv);
! ok_nv(\$snv, \$nv);
! ok_uv(\$suv, \$uv);
{
print("# Shared array initialization\n");
--- 71,79 ----
my $snv :shared = shared_clone($nv);
my $suv :shared = shared_clone($uv);
! ok_iv($siv, $iv);
! ok_nv($snv, $nv);
! ok_uv($suv, $uv);
{
print("# Shared array initialization\n");
2014-11-02 19:27 GMT+01:00 Gintautas Grigelionis <g.grigelionis@gmail.com>:
Show quoted text> If I my understanding is correct, variables passed to sub are copies, not
> references.
> So tests in threads::shared do not compare the same thing as List::Utils
> does.
> I lack the knowledge to figure out why this difference matters in 5.8 but
> not in newer Perls.
> In any case, threads::shared should test the same thing as List::Utils and
> either desupport 5.8 or fix share().
>