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.16.212.203
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 : readonly.t
#!/usr/bin/perl -I.. # Test the Readonly function use strict; use Test::More tests => 19; # Find the module (1 test) BEGIN {use_ok('Readonly'); } my $expected = qr/Modification of a read-only value attempted at \(eval \d+\),? line 1/; SKIP: { skip 'Readonly \\ syntax is for perls earlier than 5.8', 9 if $] >= 5.008; eval q{Readonly \my $ros => 45}; is $@ => '', 'Create scalar'; eval q{Readonly \my $ros2 => 45; $ros2 = 45}; like $@ => $expected, 'Modify scalar'; eval q{Readonly \my @roa => (1, 2, 3, 4)}; is $@ => '', 'Create array'; eval q{Readonly \my @roa2 => (1, 2, 3, 4); $roa2[2] = 3}; like $@ => $expected, 'Modify array'; eval q{Readonly \my %roh => (key1 => "value", key2 => "value2")}; is $@ => '', 'Create hash (list)'; eval q{Readonly \my %roh => (key1 => "value", "key2")}; like $@ => qr/odd number of values/, 'Odd number of values'; eval q{Readonly \my %roh2 => (key1 => "value", key2 => "value2"); $roh2{key1}="value"}; like $@ => $expected, 'Modify hash'; eval q{Readonly \my %roh => {key1 => "value", key2 => "value2"}}; is $@ => '', 'Create hash (hashref)'; eval q{Readonly \my %roh2 => {key1 => "value", key2 => "value2"}; $roh2{key1}="value"}; like $@ => $expected, 'Modify hash'; }; SKIP: { skip 'Readonly $@% syntax is for perl 5.8 or later', 9 unless $] >= 5.008; eval q{Readonly my $ros => 45}; is $@ => '', 'Create scalar'; eval q{Readonly my $ros2 => 45; $ros2 = 45}; like $@ => $expected, 'Modify scalar'; eval q{Readonly my @roa => (1, 2, 3, 4)}; is $@ => '', 'Create array'; eval q{Readonly my @roa2 => (1, 2, 3, 4); $roa2[2] = 3}; like $@ => $expected, 'Modify array'; eval q{Readonly my %roh => (key1 => "value", key2 => "value2")}; is $@ => '', 'Create hash (list)'; eval q{Readonly my %roh => (key1 => "value", "key2")}; like $@ => qr/odd number of values/, 'Odd number of values'; eval q{Readonly my %roh2 => (key1 => "value", key2 => "value2"); $roh2{key1}="value"}; like $@ => $expected, 'Modify hash'; eval q{Readonly my %roh => {key1 => "value", key2 => "value2"}}; is $@ => '', 'Create hash (hashref)'; eval q{Readonly my %roh2 => {key1 => "value", key2 => "value2"}; $roh2{key1}="value"}; like $@ => $expected, 'Modify hash'; };
Close