⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.177
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
.cpan
/
build
/
YAML-LibYAML-0.89-0
/
t
/
View File Name :
ref-scalar.t
use FindBin '$Bin'; use lib $Bin; use TestYAMLTests tests => 11; run { my $block = shift; my @values = eval $block->perl; is Dump(@values), $block->yaml, "Dump - " . $block->name unless $block->SKIP_DUMP; is_deeply [Load($block->yaml)], \@values, "Load - " . $block->name; }; my @warn; $SIG{__WARN__} = sub { push(@warn, shift) }; my $z = YAML::XS::Load(<
{foo}}; is_deeply \@warn, [], "No free of unref warnings"; __DATA__ === Simple scalar ref +++ perl \ 42; +++ yaml --- !!perl/ref =: 42 === Ref to scalar ref +++ perl \\ "foo bar"; +++ yaml --- !!perl/ref =: !!perl/ref =: foo bar === Scalar refs an aliases +++ perl my $x = \\ 3.1415; [$x, $$x]; +++ yaml --- - !!perl/ref =: &1 !!perl/ref =: 3.1415 - *1 === Ref to undef +++ perl my $x = {foo => \undef}; +++ yaml --- foo: !!perl/ref =: ~ === Circular ref to scalar +++ perl my $x; $x = \$x; +++ yaml --- &1 !!perl/ref =: *1