TODO package A;our @VERSION passing is_class_loaded
[gitmo/Mouse.git] / t / 005-extends.t
CommitLineData
c3398f5b 1#!/usr/bin/env perl
2use strict;
3use warnings;
ca73a208 4use Test::More tests => 7;
c3398f5b 5use lib 't/lib';
6
7do {
8 package Class;
9 use Mouse;
10
11 package Child;
12 use Mouse;
13 extends 'Class';
14
15 package Mouse::TestClass;
16 use Mouse;
abe28e11 17 extends 'Unsweetened';
c3398f5b 18
19 sub mouse { 1 }
20};
21
22can_ok(Child => 'new');
23
24my $child = Child->new;
25
26isa_ok($child => 'Child');
27isa_ok($child => 'Class');
28isa_ok($child => 'Mouse::Object');
29
abe28e11 30can_ok('Mouse::TestClass' => qw(mouse unsweetened));
c3398f5b 31
ca73a208 32eval "
33 package Child;
34 use Mouse;
35";
36
37isa_ok($child => 'Class');
38isa_ok($child => 'Mouse::Object');
39