?????????? ????????? - ??????????????? - /home/agenciai/public_html/cd38d8/example.tar
???????
callback.pl 0000644 00000000326 15125143257 0006643 0 ustar 00 #!perl -w use strict; use Test::LeakTrace; use Data::Dumper; leaktrace{ my %a; my %b; $a{b} = \%b; $b{a} = \%a; } sub { my($ref, $file, $line) = @_; print "#line $line $file\n"; print Dumper($ref); }; weakref.pl 0000644 00000000633 15125143257 0006534 0 ustar 00 #!perl -w use strict; use Test::More tests => 1; use Test::LeakTrace qw(:test); { package X; use Scalar::Util qw(weaken); sub new{ my($class) = @_; my $self = bless {}, $class; return $self; } sub set_other{ my($self, $other) = @_; weaken($self->{other} = $other) if $other; return $self; } } no_leaks_ok{ my $a = X->new; my $b = X->new; $a->set_other($b); $b->set_other($a); }; test_fail.pl 0000644 00000000224 15125143257 0007056 0 ustar 00 #!perl -w use strict; use Test::More tests => 1; use Test::LeakTrace; no_leaks_ok{ diag "in not_leaked"; my @array; push @array, \@array; }; method_cache.pl 0000644 00000000300 15125143257 0007502 0 ustar 00 #!perl -w use strict; use Test::LeakTrace; { package Base; sub hello{ print "Hello, world!\n"; } package Derived; our @ISA = qw(Base); } leaktrace{ Derived->hello(); } -verbose; simple.pl 0000644 00000000202 15125143257 0006371 0 ustar 00 #!perl -w use strict; use Test::LeakTrace; my($mode) = @ARGV; leaktrace{ my %a; my %b; $a{b} = \%a; $b{a} = \%b; } $mode; leaked_refs.pl 0000644 00000000271 15125143257 0007352 0 ustar 00 #!perl -w use strict; use Test::LeakTrace; use Data::Dumper; my @refs = leaked_refs{ my %a; my %b; $a{b} = \%b; $b{a} = \%a; }; print Data::Dumper->Dump([\@refs], ['*leaked']); leaktrace.t 0000644 00000000514 15125143257 0006671 0 ustar 00 #!perl -w # a test script template use strict; use constant HAS_LEAKTRACE => eval{ require Test::LeakTrace }; use Test::More HAS_LEAKTRACE ? (tests => 1) : (skip_all => 'require Test::LeakTrace'); use Test::LeakTrace; use threads; # for example leaks_cmp_ok{ my $thr = async{ my $i; $i++; }; $thr->join(); } '<', 1; script.pl 0000644 00000000235 15125143257 0006412 0 ustar 00 #!perl -w use strict; use Test::LeakTrace::Script -lines; use Scalar::Util qw(weaken); { my %a; my %b; $a{b} = \%b; $b{a} = \%a; } print "done.\n";
| ver. 1.6 |
Github
|
.
| PHP 8.2.30 | ??????????? ?????????: 0 |
proxy
|
phpinfo
|
???????????