Linux cpanel2.daytoncreative.net 2.6.32-754.29.2.el6.x86_64 #1 SMP Tue May 12 17:39:04 UTC 2020 x86_64
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4
Server IP : 70.62.220.67 & Your IP : 216.73.216.193
Domains :
Cant Read [ /etc/named.conf ]
User : michaelgreg
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
log /
perl-5.20.2 /
t /
test_pl /
Delete
Unzip
Name
Size
Permission
Date
Action
_num_to_alpha.t
1.57
KB
-r--r--r--
2014-12-27 11:49
can_isa_ok.t
1.41
KB
-r--r--r--
2014-12-27 11:49
tempfile.t
2.47
KB
-r--r--r--
2014-12-27 11:49
Save
Rename
#!/usr/bin/env perl -w # Test isa_ok() and can_ok() in test.pl use strict; use warnings; BEGIN { require "test.pl"; } require Test::More; can_ok('Test::More', qw(require_ok use_ok ok is isnt like skip can_ok pass fail eq_array eq_hash eq_set)); can_ok(bless({}, "Test::More"), qw(require_ok use_ok ok is isnt like skip can_ok pass fail eq_array eq_hash eq_set)); isa_ok(bless([], "Foo"), "Foo"); isa_ok([], 'ARRAY'); isa_ok(\42, 'SCALAR'); { local %Bar::; local @Foo::ISA = 'Bar'; isa_ok( "Foo", "Bar" ); } # can_ok() & isa_ok should call can() & isa() on the given object, not # just class, in case of custom can() { local *Foo::can; local *Foo::isa; *Foo::can = sub { $_[0]->[0] }; *Foo::isa = sub { $_[0]->[0] }; my $foo = bless([0], 'Foo'); ok( ! $foo->can('bar') ); ok( ! $foo->isa('bar') ); $foo->[0] = 1; can_ok( $foo, 'blah'); isa_ok( $foo, 'blah'); } note "object/class_ok"; { { package Child; our @ISA = qw(Parent); } { package Parent; sub new { bless {}, shift } } # Unfortunately we can't usefully test the failure case without # significantly modifying test.pl class_ok "Child", "Parent"; class_ok "Parent", "Parent"; object_ok( Parent->new, "Parent" ); object_ok( Child->new, "Parent" ); } done_testing;