"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cpan/Scalar-List-Utils/t/refaddr.t" between
perl-5.32.0-RC0.tar.xz and perl-5.32.0-RC1.tar.xz

About: Perl (Practical Extraction and Report Language) is a high-level, general-purpose, interpreted, dynamic programming language. Release candidate.

refaddr.t  (perl-5.32.0-RC0.tar.xz):refaddr.t  (perl-5.32.0-RC1.tar.xz)
skipping to change at line 67 skipping to change at line 67
} }
my $a = {}; my $a = {};
my $r = refaddr($a); my $r = refaddr($a);
$z = bless $a, '0'; $z = bless $a, '0';
ok(refaddr($z) > 10); ok(refaddr($z) > 10);
is(refaddr($z),$r,"foo"); is(refaddr($z),$r,"foo");
} }
package FooBar; package FooBar;
use overload '0+' => sub { 10 }, use overload
'+' => sub { 10 + $_[1] }, '0+' => sub { 10 },
'""' => sub { "10" }; '+' => sub { 10 + $_[1] },
'""' => sub { "10" };
package MyTie; package MyTie;
sub TIEHANDLE { bless {} } sub TIEHANDLE { bless {} }
sub DESTROY {} sub DESTROY {}
sub AUTOLOAD { sub AUTOLOAD {
our $AUTOLOAD; our $AUTOLOAD;
warn "$AUTOLOAD called"; warn "$AUTOLOAD called";
exit 1; # May be in an eval exit 1; # May be in an eval
} }
package Hash3; package Hash3;
use Scalar::Util qw(refaddr); use Scalar::Util qw(refaddr);
sub TIEHASH sub TIEHASH
{ {
my $pkg = shift; my $pkg = shift;
return bless [ @_ ], $pkg; return bless [ @_ ], $pkg;
} }
sub FETCH sub FETCH
{ {
my $self = shift; my $self = shift;
my $key = shift; my $key = shift;
my ($underlying) = @$self; my ($underlying) = @$self;
return $underlying->{refaddr($key)}; return $underlying->{refaddr($key)};
} }
sub STORE sub STORE
{ {
my $self = shift; my $self = shift;
my $key = shift; my $key = shift;
my $value = shift; my $value = shift;
my ($underlying) = @$self; my ($underlying) = @$self;
return ($underlying->{refaddr($key)} = $key); return ($underlying->{refaddr($key)} = $key);
} }
 End of changes. 4 change blocks. 
14 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)