diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-02 14:10:14 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-02 14:10:14 +0100 |
commit | a636c943c3929a440786edb825bc8af23c40278f (patch) | |
tree | 65390de14b46dff22242a06cc1af9d4c0ecea7a0 /cpan/parent/t/compile-time.t | |
parent | 05a635f834d8c223c0afe494921c441beac2f189 (diff) | |
download | perl-a636c943c3929a440786edb825bc8af23c40278f.tar.gz |
Move parent from ext/ to cpan/
Diffstat (limited to 'cpan/parent/t/compile-time.t')
-rw-r--r-- | cpan/parent/t/compile-time.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cpan/parent/t/compile-time.t b/cpan/parent/t/compile-time.t new file mode 100644 index 0000000000..be6d54cb74 --- /dev/null +++ b/cpan/parent/t/compile-time.t @@ -0,0 +1,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'; + |