test for this (which requires Test::Output to run).
The tests had many "use_ok('Moose')" lines that started warning. The
use_ok tests weren't really testing anything, since the tests need the
modules they were trying to load in order to run. You actually get a
better error message by just using the module normally (if said module
fails to compile).
- Add a remove_keywords function so if you extend Moose
you don't have to cargo cult Moose's unimport (Sartak)
+ * Moose
+ - Moose now warns when you try to have it export its sugar
+ functions into the "main" package. Previously it silently did
+ nothing. (Dave Rolsky)
+
0.55 Sun August 3, 2008
* Moose::Meta::Attribute
- breaking down the way 'handles' methods are
warnings->import;
# we should never export to main
- return if $CALLER eq 'main';
+ if ($CALLER eq 'main') {
+ warn qq{Moose does not export its sugar to the 'main' package.\n};
+ return;
+ }
init_meta( $CALLER, 'Moose::Object' );
use Test::More tests => 1;
-BEGIN {
- use_ok('Moose');
-}
+package Foo;
+
+# Moose will issue a warning if we try to load it from the main
+# package.
+::use_ok('Moose');
+
+
use strict;
use warnings;
-use Test::More tests => 58;
+use Test::More tests => 57;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
-
{
package Point;
use Moose;
use strict;
use warnings;
-use Test::More tests => 24;
+use Test::More tests => 23;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
-
{
package BankAccount;
use Moose;
use strict;
use warnings;
-use Test::More tests => 34;
+use Test::More tests => 33;
use Test::Exception;
use Scalar::Util 'isweak';
-BEGIN {
- use_ok('Moose');
-}
-
{
package BinaryTree;
use Moose;
BEGIN {
eval "use Regexp::Common; use Locale::US;";
plan skip_all => "Regexp::Common & Locale::US required for this test" if $@;
- plan tests => 66;
+ plan tests => 65;
}
use Test::Exception;
use Scalar::Util 'isweak';
-BEGIN {
- use_ok('Moose');
-}
+
{
package Address;
BEGIN {
eval "use HTTP::Headers; use Params::Coerce; use URI;";
plan skip_all => "HTTP::Headers & Params::Coerce & URI required for this test" if $@;
- plan tests => 18;
+ plan tests => 17;
}
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
-
{
package Request;
use Moose;
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
## Augment/Inner
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 1;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
## meta-attribute example
{
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
## attribute trait example
{
use strict;
use warnings;
-use Test::More tests => 64;
+use Test::More tests => 63;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
## Roles
use strict;
use warnings;
-use Test::More tests => 23;
+use Test::More tests => 22;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use lib 't/lib', 'lib';
-use Test::More tests => 6;
+use Test::More tests => 5;
+
-BEGIN {
- use_ok('Moose');
-}
{
package Bar;
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 16;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 16;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 6;
+use Test::More tests => 5;
+
-BEGIN {
- use_ok('Moose');
-}
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 16;
+use Test::More tests => 15;
+
-BEGIN {
- use_ok('Moose');
-}
=pod
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 7;
+
-BEGIN {
- use_ok('Moose');
-}
{
package TouchyBase;
use strict;
use warnings;
-use Test::More tests => 47;
+use Test::More tests => 46;
+
-BEGIN {
- use_ok('Moose');
-}
my @moose_exports = qw(
extends with
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 9;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More tests => 7;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Util::TypeConstraints');
-}
+use Moose::Util::TypeConstraints;
=pod
use strict;
use warnings;
-use Test::More tests => 13;
+use Test::More tests => 11;
use Test::Exception;
use Scalar::Util 'blessed';
-BEGIN {
- use_ok('Moose');
- use_ok("Moose::Util::TypeConstraints");
-}
+use Moose::Util::TypeConstraints;
subtype 'Positive'
=> as 'Num'
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 7;
use Test::Exception;
-BEGIN {
- use_ok('Moose::Meta::Class');
- use_ok('Moose');
- use_ok('Moose::Role');
-}
-
{
package Class;
use Moose;
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More tests => 8;
-BEGIN {
- use_ok('Moose::Meta::Class');
- use_ok('Moose');
- use_ok('Moose::Role');
-}
+use Moose::Meta::Class;
{
package Class;
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+BEGIN {
+ eval "use Test::Output;";
+ plan skip_all => "Test::Output is required for this test" if $@;
+ plan tests => 1;
+}
+
+stderr_is( sub { package main; eval 'use Moose' },
+ "Moose does not export its sugar to the 'main' package.\n",
+ 'Moose warns when loaded from the main package' );
use strict;
use warnings;
-use Test::More tests => 14;
+use Test::More tests => 13;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 30;
+use Test::More tests => 29;
use Test::Exception;
use Scalar::Util 'isweak';
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 58;
+use Test::More tests => 57;
use Test::Exception;
use Scalar::Util 'isweak';
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use Scalar::Util 'isweak';
-use Test::More tests => 26;
+use Test::More tests => 25;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 9;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo::Role;
use strict;
use warnings;
-use Test::More tests => 16;
+use Test::More tests => 15;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 16;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo::Meta::Attribute;
use strict;
use warnings;
-use Test::More tests => 19;
+use Test::More tests => 18;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 83;
+use Test::More tests => 82;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Thing;
use strict;
use warnings;
-use Test::More tests => 85;
+use Test::More tests => 84;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
# -------------------------------------------------------------------
# HASH handles
use strict;
use warnings;
-use Test::More tests => 44;
+use Test::More tests => 43;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
{
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More tests => 11;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Customer;
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package HTTPHeader;
use strict;
use warnings;
-use Test::More tests => 13;
+use Test::More tests => 12;
use Test::Exception;
use Test::Moose;
-BEGIN {
- use_ok('Moose');
-}
+
{
package My::Attribute::Trait;
use strict;
use warnings;
-use Test::More tests => 24;
+use Test::More tests => 23;
use Test::Exception;
use Test::Moose;
-BEGIN {
- use_ok('Moose');
-}
+
{
package My::Attribute::Trait;
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 7;
use Test::Exception;
use Test::Moose;
-BEGIN {
- use_ok('Moose');
-}
+
{
package My::Meta::Attribute::DefaultReadOnly;
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 4;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 24;
+use Test::More tests => 23;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More tests => 11;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Fake::DateTime;
use strict;
use warnings;
-use Test::More tests => 18;
+use Test::More tests => 17;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
+
-BEGIN {
- use_ok('Moose');
-}
{
package Bar::Meta::Attribute;
use strict;
use warnings;
-use Test::More tests => 29;
+use Test::More tests => 27;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role');
-}
+use Moose::Meta::Role;
{
package FooRole;
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More tests => 10;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo::Role;
use strict;
use warnings;
-use Test::More tests => 89; # it's really 126 with kolibre's tests;
+use Test::More tests => 87; # it's really 124 with kolibre's tests;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Role');
-}
-
=pod
Mutually recursive roles.
use strict;
use warnings;
-use Test::More tests => 24;
+use Test::More tests => 22;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Role');
-}
-
=pod
The idea and examples for this feature are taken
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 15;
use Test::Exception;
=pod
not any real functionality.
- SL
-=cut
-
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Role');
-}
-
-=pod
-
Role which requires a method implemented
in another role as an override (it does
not remove the requirement)
use strict;
use warnings;
-use Test::More tests => 34;
+use Test::More tests => 32;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Role');
-}
-
=pod
Check for repeated inheritence causing
use strict;
use warnings;
-use Test::More tests => 75;
+use Test::More tests => 74;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
# NOTE:
use strict;
use warnings;
-use Test::More tests => 28;
+use Test::More tests => 27;
use Scalar::Util qw(blessed);
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use strict;
use warnings;
-use Test::More tests => 40;
+use Test::More tests => 39;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
# test no conflicts here
use strict;
use warnings;
-use Test::More tests => 20;
+use Test::More tests => 19;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package My::Role;
use strict;
use warnings;
-use Test::More tests => 36;
+use Test::More tests => 35;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package My::Role;
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 9;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More tests => 11;
use Test::Exception;
use Scalar::Util 'blessed';
-BEGIN {
- use_ok('Moose');
-}
+
{
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 7;
use Test::Exception;
use Scalar::Util 'blessed';
-BEGIN {
- use_ok('Moose');
-}
+
{
use strict;
use warnings;
-use Test::More tests => 28;
+use Test::More tests => 27;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use strict;
use warnings;
-use Test::More tests => 22;
+use Test::More tests => 21;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 14;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role::Application::RoleSummation');
- use_ok('Moose::Meta::Role::Composite');
-}
+use Moose::Meta::Role::Application::RoleSummation;
+use Moose::Meta::Role::Composite;
{
package Role::Foo;
use strict;
use warnings;
-use Test::More tests => 15;
+use Test::More tests => 12;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role::Application::RoleSummation');
- use_ok('Moose::Meta::Role::Composite');
-}
+use Moose::Meta::Role::Application::RoleSummation;
+use Moose::Meta::Role::Composite;
{
package Role::Foo;
use strict;
use warnings;
-use Test::More tests => 19;
+use Test::More tests => 16;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role::Application::RoleSummation');
- use_ok('Moose::Meta::Role::Composite');
-}
+use Moose::Meta::Role::Application::RoleSummation;
+use Moose::Meta::Role::Composite;
{
package Role::Foo;
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 7;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role::Application::RoleSummation');
- use_ok('Moose::Meta::Role::Composite');
-}
+use Moose::Meta::Role::Application::RoleSummation;
+use Moose::Meta::Role::Composite;
{
package Role::Foo;
use strict;
use warnings;
-use Test::More tests => 22;
+use Test::More tests => 19;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role::Application::RoleSummation');
- use_ok('Moose::Meta::Role::Composite');
-}
+use Moose::Meta::Role::Application::RoleSummation;
+use Moose::Meta::Role::Composite;
{
package Role::Foo;
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More tests => 8;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role::Application::RoleSummation');
- use_ok('Moose::Meta::Role::Composite');
-}
+use Moose::Meta::Role::Application::RoleSummation;
+use Moose::Meta::Role::Composite;
{
package Role::Foo;
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 7;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role::Application::RoleSummation');
- use_ok('Moose::Meta::Role::Composite');
-}
+use Moose::Meta::Role::Application::RoleSummation;
+use Moose::Meta::Role::Composite;
{
package Role::Foo;
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More skip_all => 'The feature this test exercises is not yet written';
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
-
-=pod
{
package Scalar;
sub eq { shift == shift }
}
-
-=cut
-
use lib 't/lib', 'lib';
-use Test::More tests => 5;
+use Test::More tests => 4;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
$SIG{__WARN__} = sub { 0 };
use strict;
use warnings;
-use Test::More tests => 26;
+use Test::More tests => 25;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package HTTPHeader;
BEGIN {
eval "use IO::String; use IO::File;";
plan skip_all => "IO::String and IO::File are required for this test" if $@;
- plan tests => 29;
+ plan tests => 28;
}
-BEGIN {
- use_ok('Moose');
-}
+
{
package Email::Moose;
use strict;
use warnings;
-use Test::More tests => 19;
+use Test::More tests => 17;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Util::TypeConstraints');
-}
+use Moose::Util::TypeConstraints;
my $type = Moose::Util::TypeConstraints::find_or_parse_type_constraint('Maybe[Int]');
isa_ok($type, 'Moose::Meta::TypeConstraint');
use strict;
use warnings;
-use Test::More tests => 55;
+use Test::More tests => 54;
use Test::Exception;
-BEGIN
-{
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 3;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package My::Custom::Meta::Attr;
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-};
+;
lives_ok {
package MooseX::Attribute::Test;
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 4;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 16;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 7;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
BEGIN {
package MyFramework::Base;
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 4;
+
+use Moose ();
-BEGIN {
- use_ok('Moose');
-}
{ package Foo; }
use strict;
use warnings;
-use Test::More tests => 7;
+use Test::More tests => 6;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use strict;
use warnings;
-use Test::More tests => 7;
+use Test::More tests => 6;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Elk;
{ package Object::Test; }
-use_ok('Moose');
+package Foo;
+::use_ok('Moose');
use lib 't/lib', 'lib';
-use Test::More tests => 3;
+use Test::More tests => 2;
+
-BEGIN {
- use_ok('Moose');
-}
use_ok('MyMooseA');
use_ok('MyMooseB');
\ No newline at end of file
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
+
-BEGIN {
- use_ok('Moose');
-}
=pod
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 1;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use strict;
use warnings;
-use Moose;
use Test::More tests => 3;
use strict;
use warnings;
-use Moose;
use Test::More tests => 1;
use Test::Exception;
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 3;
+
-BEGIN {
- use_ok('Moose');
-}
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
+
-BEGIN {
- use_ok('Moose');
-}
{
package Foo;
use warnings;
use FindBin;
-use Test::More tests => 146;
+use Test::More tests => 144;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Util::TypeConstraints');
-}
+use Moose::Util::TypeConstraints;
subtype 'FilePath'
=> as 'Str'
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 4;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 1;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package My::Role;
use Test::More no_plan => 1;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
# RT #37569
use strict;
use warnings;
-use Test::More tests => 37;
+use Test::More tests => 36;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
BEGIN {
package MyRole;
use strict;
use warnings;
-use Test::More tests => 21;
+use Test::More tests => 20;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
## Roles
plan skip_all => "DBM::Deep 1.0003 (or greater) is required for this test" if $@;
eval "use DateTime::Format::MySQL;";
plan skip_all => "DateTime::Format::MySQL is required for this test" if $@;
- plan tests => 89;
+ plan tests => 88;
}
use Test::Exception;
unlink('newswriter.db') if -e 'newswriter.db';
}
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use strict;
use warnings;
-use Test::More tests => 32;
+use Test::More tests => 30;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Role');
-}
-
sub U {
my $f = shift;
sub { $f->($f, @_) };
BEGIN {
eval "use Declare::Constraints::Simple;";
plan skip_all => "Declare::Constraints::Simple is required for this test" if $@;
- plan tests => 11;
+ plan tests => 9;
}
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Util::TypeConstraints');
-}
-
{
package Foo;
use Moose;
BEGIN {
eval "use Test::Deep;";
plan skip_all => "Test::Deep is required for this test" if $@;
- plan tests => 7;
+ plan tests => 5;
}
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Util::TypeConstraints');
-}
-
{
package Foo;
use Moose;
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More tests => 8;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Record;
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 15;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role');
-}
+use Moose::Meta::Role;
+
{
package FooRole;
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 4;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package My::Role;
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 1;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package My::Meta;
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 3;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package Foo;
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 8;
use Test::Exception;
use Scalar::Util 'blessed';
-BEGIN {
- use_ok('Moose');
- use_ok('Moose::Meta::Role');
-}
-
=pod
This test it kind of odd, it tests
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 3;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
{
package AClass;
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
=pod
use Test::More no_plan => 1;
use Test::Exception;
-BEGIN {
- use_ok('Moose');
-}
+
=pod