Linux server.nvwebsoft.co.in 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
Apache
: 162.240.12.249 | : 3.143.7.53
202 Domain
8.1.31
nbspublicschool
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
perl-Readonly-1.03 /
t /
[ HOME SHELL ]
Name
Size
Permission
Action
array.t
2
KB
-rw-r--r--
deepa.t
1.18
KB
-rw-r--r--
deeph.t
1.23
KB
-rw-r--r--
deeps.t
1.72
KB
-rw-r--r--
docs.t
2.2
KB
-rw-r--r--
export.t
186
B
-rw-r--r--
hash.t
1.64
KB
-rw-r--r--
readonly.t
2.19
KB
-rw-r--r--
reassign.t
3.03
KB
-rw-r--r--
scalar.t
1.28
KB
-rw-r--r--
tie.t
603
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : deeph.t
#!/usr/bin/perl -I.. # Test Hash vs Hash1 functionality use strict; use Test::More tests => 13; # Find the module (1 test) BEGIN {use_ok('Readonly'); } sub expected { my $line = shift; $@ =~ s/\.$//; # difference between croak and die return "Modification of a read-only value attempted at " . __FILE__ . " line $line\n"; } use vars qw/%h1 %h2/; my $m1 = 17; # Create (2 tests) eval {Readonly::Hash %h1 => (key1 => \$m1, key2 => {x => 5, z => [1, 2, 3]})}; is $@ => '', 'Create a deep reference array'; eval {Readonly::Hash1 %h2 => (key1 => \$m1, key2 => {x => 5, z => [1, 2, 3]})}; is $@ => '', 'Create a shallow reference array'; # Modify (10 tests) eval {$h1{key1} = 7}; is $@ => expected(__LINE__-1), 'Modify h1'; eval {$h2{key1} = 7}; is $@ => expected(__LINE__-1), 'Modify h2'; eval {${$h1{key1}} = "the"}; is $@ => expected(__LINE__-1), 'Deep-modify h1'; is $m1 => 17, 'h1 unchanged'; eval {${$h2{key1}} = "the"}; is $@ => '', 'Deep-modify h2'; is $m1 => 'the', 'h2 modification successful'; eval {$h1{key2}{z}[1] = 42}; is $@ => expected(__LINE__-1), 'Deep-deep modify h1'; is $h1{key2}{z}[1] => 2, 'h1 unchanged'; eval {$h2{key2}{z}[2] = 42}; is $@ => '', 'Deep-deep modify h2'; is $h2{key2}{z}[2], 42, 'h2 mod successful';
Close