403Webshell
Server IP : 164.138.27.172  /  Your IP : 216.73.216.143
Web Server : nginx/1.27.4
System : Linux cookingdream 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : www-adm ( 1001)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/jonasn/.cpan/build/Test-Deep-1.130-0/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/jonasn/.cpan/build/Test-Deep-1.130-0/t/memory.t
use strict;
use warnings;

use Test::Tester;
use Test::More;

BEGIN
{
  require Scalar::Util;
  if (grep /^weaken$/, @Scalar::Util::EXPORT_FAIL)
  {
    plan(skip_all => "no weak refs in this version of perl");
    exit(0);
  }
}use lib 't/lib';

use Std;

use Scalar::Util qw( isweak weaken);

sub left
{
  my $ref = shift;
  eq_deeply($ref, []);
  return "left";
}

sub right
{
  my $ref = shift;
  eq_deeply([], $ref);
  return "right";
}

my @subs = (\&left, \&right);
for my $sub (@subs)
{
  my $ref = [];

  my $weak = $ref;
  weaken($weak);
  my $side = &$sub($ref, []);
  $ref = 1;
  ok((! $weak), "$side didn't capture") || diag "weak = $weak";
}

Youez - 2016 - github.com/yon3zu
LinuXploit