Moose now warns when you try to load it from the main package. Added a
[gitmo/Moose.git] / t / 010_basics / 016_load_into_main.t
CommitLineData
7ff56534 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More;
7
8BEGIN {
9 eval "use Test::Output;";
10 plan skip_all => "Test::Output is required for this test" if $@;
11 plan tests => 1;
12}
13
14stderr_is( sub { package main; eval 'use Moose' },
15 "Moose does not export its sugar to the 'main' package.\n",
16 'Moose warns when loaded from the main package' );