blob: be6d54cb747857e0e94f40d5047f325bd39d2c09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/perl -w
use strict;
use Test::More tests => 3;
{
package MyParent;
sub exclaim { "I CAN HAS PERL?" }
}
{
package Child;
use parent -norequire, 'MyParent';
}
my $obj = {};
bless $obj, 'Child';
isa_ok $obj, 'MyParent', 'Inheritance';
can_ok $obj, 'exclaim';
is $obj->exclaim, "I CAN HAS PERL?", 'Inheritance is set up correctly';
|