Commit | Line | Data |
7ff56534 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
3d659f7f |
6 | use Test::More; |
7 | BEGIN { |
8 | eval "use Test::Output;"; |
9 | plan skip_all => "Test::Output is required for this test" if $@; |
10 | plan tests => 2; |
11 | } |
7ff56534 |
12 | |
13 | stderr_is( sub { package main; eval 'use Moose' }, |
14 | "Moose does not export its sugar to the 'main' package.\n", |
15 | 'Moose warns when loaded from the main package' ); |
f967bf02 |
16 | |
17 | stderr_is( sub { package main; eval 'use Moose::Role' }, |
18 | "Moose::Role does not export its sugar to the 'main' package.\n", |
19 | 'Moose::Role warns when loaded from the main package' ); |