From: Dave Rolsky Date: Fri, 16 Sep 2011 13:31:56 +0000 (-0500) Subject: Get rid of all the bogus uses of use_ok still lurking in the code X-Git-Tag: 2.0300~70 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=28fdde7f8f44efabb7e98379cc3ad0d812f3a66a;p=gitmo%2FMoose.git Get rid of all the bogus uses of use_ok still lurking in the code --- diff --git a/t/moose_util/ensure_all_roles.t b/t/moose_util/ensure_all_roles.t index 25ef102..ec33b73 100644 --- a/t/moose_util/ensure_all_roles.t +++ b/t/moose_util/ensure_all_roles.t @@ -5,9 +5,7 @@ use warnings; use Test::More; -BEGIN { - use_ok('Moose::Util', ':all'); -} +use Moose::Util ':all'; { package Foo; diff --git a/t/moose_util/moose_util_does_role.t b/t/moose_util/moose_util_does_role.t index 2505c9d..e4f30f2 100644 --- a/t/moose_util/moose_util_does_role.t +++ b/t/moose_util/moose_util_does_role.t @@ -5,9 +5,7 @@ use warnings; use Test::More; -BEGIN { - use_ok('Moose::Util', ':all'); -} +use Moose::Util ':all'; { package Foo; diff --git a/t/moose_util/moose_util_search_class_by_role.t b/t/moose_util/moose_util_search_class_by_role.t index b618498..91d6c91 100644 --- a/t/moose_util/moose_util_search_class_by_role.t +++ b/t/moose_util/moose_util_search_class_by_role.t @@ -5,9 +5,7 @@ use warnings; use Test::More; -BEGIN { - use_ok('Moose::Util', ':all'); -} +use Moose::Util ':all'; { package SCBR::Role; use Moose::Role; diff --git a/t/test_moose/test_moose_does_ok.t b/t/test_moose/test_moose_does_ok.t index f084f38..65b5b0a 100644 --- a/t/test_moose/test_moose_does_ok.t +++ b/t/test_moose/test_moose_does_ok.t @@ -6,9 +6,7 @@ use warnings; use Test::Builder::Tester; use Test::More; -BEGIN { - use_ok('Test::Moose'); -} +use Test::Moose; { package Foo; diff --git a/t/test_moose/test_moose_has_attribute_ok.t b/t/test_moose/test_moose_has_attribute_ok.t index 07ea34c..4320ee4 100644 --- a/t/test_moose/test_moose_has_attribute_ok.t +++ b/t/test_moose/test_moose_has_attribute_ok.t @@ -6,9 +6,7 @@ use warnings; use Test::Builder::Tester; use Test::More; -BEGIN { - use_ok('Test::Moose'); -} +use Test::Moose; { package Foo; diff --git a/t/test_moose/test_moose_meta_ok.t b/t/test_moose/test_moose_meta_ok.t index 9eb1f3b..fe757bc 100644 --- a/t/test_moose/test_moose_meta_ok.t +++ b/t/test_moose/test_moose_meta_ok.t @@ -6,9 +6,7 @@ use warnings; use Test::Builder::Tester; use Test::More; -BEGIN { - use_ok('Test::Moose'); -} +use Test::Moose; { package Foo; diff --git a/t/test_moose/with_immutable.t b/t/test_moose/with_immutable.t index ec1358e..7690ce2 100644 --- a/t/test_moose/with_immutable.t +++ b/t/test_moose/with_immutable.t @@ -6,9 +6,7 @@ use warnings; use Test::Builder::Tester; use Test::More; -BEGIN { - use_ok('Test::Moose'); -} +use Test::Moose; { package Foo; diff --git a/t/todo_tests/exception_reflects_failed_constraint.t b/t/todo_tests/exception_reflects_failed_constraint.t index b178c89..894ce8d 100644 --- a/t/todo_tests/exception_reflects_failed_constraint.t +++ b/t/todo_tests/exception_reflects_failed_constraint.t @@ -10,9 +10,7 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; is( exception { subtype 'ParentConstraint' => as 'Str' => where {0}; diff --git a/t/type_constraints/advanced_type_creation.t b/t/type_constraints/advanced_type_creation.t index 1350fdc..14da7d4 100644 --- a/t/type_constraints/advanced_type_creation.t +++ b/t/type_constraints/advanced_type_creation.t @@ -5,10 +5,8 @@ use warnings; use Test::More; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); - use_ok('Moose::Meta::TypeConstraint::Parameterized'); -} +use Moose::Util::TypeConstraints; +use Moose::Meta::TypeConstraint::Parameterized; my $r = Moose::Util::TypeConstraints->get_type_constraint_registry; diff --git a/t/type_constraints/class_type_constraint.t b/t/type_constraints/class_type_constraint.t index 794e239..d47cbae 100644 --- a/t/type_constraints/class_type_constraint.t +++ b/t/type_constraints/class_type_constraint.t @@ -6,9 +6,7 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; { package Gorch; diff --git a/t/type_constraints/coerced_parameterized_types.t b/t/type_constraints/coerced_parameterized_types.t index e4386e6..19ee653 100644 --- a/t/type_constraints/coerced_parameterized_types.t +++ b/t/type_constraints/coerced_parameterized_types.t @@ -6,10 +6,8 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok("Moose::Util::TypeConstraints"); - use_ok('Moose::Meta::TypeConstraint::Parameterized'); -} +use Moose::Util::TypeConstraints; +use Moose::Meta::TypeConstraint::Parameterized; BEGIN { package MyList; diff --git a/t/type_constraints/container_type_coercion.t b/t/type_constraints/container_type_coercion.t index 0e4f3eb..99a9151 100644 --- a/t/type_constraints/container_type_coercion.t +++ b/t/type_constraints/container_type_coercion.t @@ -5,10 +5,8 @@ use warnings; use Test::More; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); - use_ok('Moose::Meta::TypeConstraint::Parameterized'); -} +use Moose::Util::TypeConstraints; +use Moose::Meta::TypeConstraint::Parameterized; my $r = Moose::Util::TypeConstraints->get_type_constraint_registry; diff --git a/t/type_constraints/container_type_constraint.t b/t/type_constraints/container_type_constraint.t index 17ebe3d..7b7354d 100644 --- a/t/type_constraints/container_type_constraint.t +++ b/t/type_constraints/container_type_constraint.t @@ -5,10 +5,8 @@ use warnings; use Test::More; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); - use_ok('Moose::Meta::TypeConstraint::Parameterized'); -} +use Moose::Util::TypeConstraints; +use Moose::Meta::TypeConstraint::Parameterized; # Array of Ints diff --git a/t/type_constraints/custom_parameterized_types.t b/t/type_constraints/custom_parameterized_types.t index 14ccd18..12bf2e8 100644 --- a/t/type_constraints/custom_parameterized_types.t +++ b/t/type_constraints/custom_parameterized_types.t @@ -6,10 +6,8 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok("Moose::Util::TypeConstraints"); - use_ok('Moose::Meta::TypeConstraint::Parameterized'); -} +use Moose::Util::TypeConstraints; +use Moose::Meta::TypeConstraint::Parameterized; is( exception { subtype 'AlphaKeyHash' => as 'HashRef' diff --git a/t/type_constraints/define_type_twice_throws.t b/t/type_constraints/define_type_twice_throws.t index 6cc05ed..de08fd6 100644 --- a/t/type_constraints/define_type_twice_throws.t +++ b/t/type_constraints/define_type_twice_throws.t @@ -6,9 +6,7 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; { package Some::Class; diff --git a/t/type_constraints/misc_type_tests.t b/t/type_constraints/misc_type_tests.t index 4b5e1d3..77f67d8 100644 --- a/t/type_constraints/misc_type_tests.t +++ b/t/type_constraints/misc_type_tests.t @@ -7,9 +7,7 @@ use Test::More; use Test::Fatal; use Scalar::Util qw(refaddr); -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; # subtype 'aliasing' ... diff --git a/t/type_constraints/normalize_type_name.t b/t/type_constraints/normalize_type_name.t index e6d7a5a..ac5ae85 100644 --- a/t/type_constraints/normalize_type_name.t +++ b/t/type_constraints/normalize_type_name.t @@ -5,9 +5,7 @@ use warnings; use Test::More; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; ## First, we check that the new regex parsing works diff --git a/t/type_constraints/parameterize_from.t b/t/type_constraints/parameterize_from.t index 3e97310..6510aef 100644 --- a/t/type_constraints/parameterize_from.t +++ b/t/type_constraints/parameterize_from.t @@ -6,9 +6,7 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; # testing the parameterize method diff --git a/t/type_constraints/role_type_constraint.t b/t/type_constraints/role_type_constraint.t index eae75d4..ea6b34d 100644 --- a/t/type_constraints/role_type_constraint.t +++ b/t/type_constraints/role_type_constraint.t @@ -6,9 +6,7 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; { package Gorch; diff --git a/t/type_constraints/subtyping_parameterized_types.t b/t/type_constraints/subtyping_parameterized_types.t index acdbd22..e80da13 100644 --- a/t/type_constraints/subtyping_parameterized_types.t +++ b/t/type_constraints/subtyping_parameterized_types.t @@ -6,9 +6,7 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok("Moose::Util::TypeConstraints"); -} +use Moose::Util::TypeConstraints; is( exception { subtype 'MySpecialHash' => as 'HashRef[Int]'; diff --git a/t/type_constraints/subtyping_union_types.t b/t/type_constraints/subtyping_union_types.t index 9b3ae24..9b13263 100644 --- a/t/type_constraints/subtyping_union_types.t +++ b/t/type_constraints/subtyping_union_types.t @@ -6,9 +6,7 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok("Moose::Util::TypeConstraints"); -} +use Moose::Util::TypeConstraints; is( exception { subtype 'MyCollections' => as 'ArrayRef | HashRef'; diff --git a/t/type_constraints/type_notation_parser.t b/t/type_constraints/type_notation_parser.t index a62e24a..fb8a7e1 100644 --- a/t/type_constraints/type_notation_parser.t +++ b/t/type_constraints/type_notation_parser.t @@ -5,9 +5,7 @@ use warnings; use Test::More; -BEGIN { - use_ok("Moose::Util::TypeConstraints"); -} +use Moose::Util::TypeConstraints; =pod diff --git a/t/type_constraints/union_types.t b/t/type_constraints/union_types.t index aa6e67d..4b46e8c 100644 --- a/t/type_constraints/union_types.t +++ b/t/type_constraints/union_types.t @@ -5,9 +5,7 @@ use warnings; use Test::More; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; my $Str = find_type_constraint('Str'); isa_ok($Str, 'Moose::Meta::TypeConstraint'); diff --git a/t/type_constraints/util_find_type_constraint.t b/t/type_constraints/util_find_type_constraint.t index fcf182d..372816b 100644 --- a/t/type_constraints/util_find_type_constraint.t +++ b/t/type_constraints/util_find_type_constraint.t @@ -5,9 +5,7 @@ use warnings; use Test::More; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; foreach my $type_name (qw( Any diff --git a/t/type_constraints/util_type_coercion.t b/t/type_constraints/util_type_coercion.t index 5ee520d..1bb84c6 100644 --- a/t/type_constraints/util_type_coercion.t +++ b/t/type_constraints/util_type_coercion.t @@ -6,9 +6,7 @@ use warnings; use Test::More; use Test::Fatal; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); -} +use Moose::Util::TypeConstraints; { package HTTPHeader;