weak.t (perl-5.32.0-RC0.tar.xz) | : | weak.t (perl-5.32.0-RC1.tar.xz) | ||
---|---|---|---|---|
#!./perl | #!./perl | |||
use strict; | use strict; | |||
use warnings; | use warnings; | |||
use Config; | use Config; | |||
use Scalar::Util (); | use Scalar::Util (); | |||
use Test::More ((grep { /weaken/ } @Scalar::Util::EXPORT_FAIL) and !$ENV{PERL_C ORE}) | use Test::More ((grep { /weaken/ } @Scalar::Util::EXPORT_FAIL) and !$ENV{PERL_C ORE}) | |||
? (skip_all => 'weaken requires XS version') | ? (skip_all => 'weaken requires XS version') | |||
: (tests => 28); | : (tests => 28); | |||
Scalar::Util->import(qw(weaken unweaken isweak)); | Scalar::Util->import(qw(weaken unweaken isweak)); | |||
# two references, one is weakened, the other is then undef'ed. | # two references, one is weakened, the other is then undef'ed. | |||
{ | { | |||
my ($y,$z); | my ($y,$z); | |||
{ | { | |||
my $x = "foo"; | my $x = "foo"; | |||
$y = \$x; | $y = \$x; | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |