Work around 5.6.2 warnings
[gitmo/Mouse.git] / t / 010_basics / 002_require_superclasses.t
CommitLineData
60ad2cb7 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use lib 't/lib', 'lib';
7
8use Test::More tests => 4;
9use Test::Exception;
10
11
12
13{
14
15 package Bar;
16 use Mouse;
17
18 ::lives_ok { extends 'Foo' } 'loaded Foo superclass correctly';
19}
20
21{
22
23 package Baz;
24 use Mouse;
25
26 ::lives_ok { extends 'Bar' } 'loaded (inline) Bar superclass correctly';
27}
28
29{
30
31 package Foo::Bar;
32 use Mouse;
33
34 ::lives_ok { extends 'Foo', 'Bar' }
35 'loaded Foo and (inline) Bar superclass correctly';
36}
37
38{
39
40 package Bling;
41 use Mouse;
42
43 ::throws_ok { extends 'No::Class' }
44 qr{Can't locate No/Class\.pm in \@INC},
45 'correct error when superclass could not be found';
46}
47