015d7fe35771638b8171b8cdd42ebcf24b2cd233
[gitmo/Moose.git] / t / 010_basics / 016_load_into_main.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 2;
7 use Test::Output;
8
9 stderr_is( sub { package main; eval 'use Moose' },
10            "Moose does not export its sugar to the 'main' package.\n",
11            'Moose warns when loaded from the main package' );
12
13 stderr_is( sub { package main; eval 'use Moose::Role' },
14            "Moose::Role does not export its sugar to the 'main' package.\n",
15            'Moose::Role warns when loaded from the main package' );