Moose now warns when you try to load it from the main package. Added a
authorDave Rolsky <autarch@urth.org>
Tue, 5 Aug 2008 03:04:22 +0000 (03:04 +0000)
committerDave Rolsky <autarch@urth.org>
Tue, 5 Aug 2008 03:04:22 +0000 (03:04 +0000)
commit7ff5653479c2bfc0794635f7fbade9bfe7bb2381
treeb0bba245a4f01c26caa21d188314c2fc7f52a318
parentff8edb9babac5b46fe69f2b41226d9b5a1403403
Moose now warns when you try to load it from the main package. Added a
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).
112 files changed:
Changes
lib/Moose.pm
t/000_load.t
t/000_recipes/basics/001_point.t
t/000_recipes/basics/002_bank_account.t
t/000_recipes/basics/003_binary_tree.t
t/000_recipes/basics/004_company.t
t/000_recipes/basics/005_coercion.t
t/000_recipes/basics/006_augment_inner.t
t/000_recipes/meta/002_meta_attribute.t
t/000_recipes/meta/003_attribute_trait.t
t/000_recipes/roles/001_roles.t
t/010_basics/001_basic_class_setup.t
t/010_basics/002_require_superclasses.t
t/010_basics/003_super_and_override.t
t/010_basics/004_inner_and_augment.t
t/010_basics/005_override_augment_inner_super.t
t/010_basics/006_override_and_foreign_classes.t
t/010_basics/008_wrapped_method_cxt_propagation.t
t/010_basics/009_import_unimport.t
t/010_basics/010_method_modifier_with_regexp.t
t/010_basics/011_moose_respects_type_constraints.t
t/010_basics/012_rebless.t
t/010_basics/013_create.t
t/010_basics/014_create_anon.t
t/010_basics/016_load_into_main.t [new file with mode: 0644]
t/020_attributes/001_attribute_reader_generation.t
t/020_attributes/002_attribute_writer_generation.t
t/020_attributes/003_attribute_accessor_generation.t
t/020_attributes/004_attribute_triggers.t
t/020_attributes/005_attribute_does.t
t/020_attributes/006_attribute_required.t
t/020_attributes/007_attribute_custom_metaclass.t
t/020_attributes/008_attribute_type_unions.t
t/020_attributes/009_attribute_inherited_slot_specs.t
t/020_attributes/010_attribute_delegation.t
t/020_attributes/012_misc_attribute_tests.t
t/020_attributes/013_attr_dereference_test.t
t/020_attributes/014_misc_attribute_coerce_lazy.t
t/020_attributes/015_attribute_traits.t
t/020_attributes/016_attribute_traits_registered.t
t/020_attributes/017_attribute_traits_n_meta.t
t/020_attributes/018_no_init_arg.t
t/020_attributes/019_attribute_lazy_initializer.t
t/020_attributes/020_trigger_and_coerce.t
t/020_attributes/021_method_generation_rules.t
t/020_attributes/022_legal_options_for_inheritance.t
t/030_roles/001_meta_role.t
t/030_roles/004_role_composition_errors.t
t/030_roles/005_role_conflict_detection.t
t/030_roles/006_role_exclusion.t
t/030_roles/007_roles_and_req_method_edge_cases.t
t/030_roles/008_role_conflict_edge_cases.t
t/030_roles/009_more_role_edge_cases.t
t/030_roles/010_run_time_role_composition.t
t/030_roles/011_overriding.t
t/030_roles/012_method_exclusion_in_composition.t
t/030_roles/013_method_aliasing_in_composition.t
t/030_roles/014_more_alias_and_exclude.t
t/030_roles/015_runtime_roles_and_attrs.t
t/030_roles/016_runtime_roles_and_nonmoose.t
t/030_roles/017_extending_role_attrs.t
t/030_roles/018_runtime_roles_w_params.t
t/030_roles/020_role_composite.t
t/030_roles/021_role_composite_exclusion.t
t/030_roles/022_role_composition_req_methods.t
t/030_roles/023_role_composition_attributes.t
t/030_roles/024_role_composition_methods.t
t/030_roles/025_role_composition_override.t
t/030_roles/026_role_composition_method_mods.t
t/030_roles/030_role_parameterized.t
t/040_type_constraints/006_util_type_reloading.t
t/040_type_constraints/007_util_more_type_coercion.t
t/040_type_constraints/009_union_types_and_coercions.t
t/040_type_constraints/021_maybe_type_constraint.t
t/040_type_constraints/023_types_and_undef.t
t/050_metaclasses/001_custom_attr_meta_with_roles.t
t/050_metaclasses/002_custom_attr_meta_as_role.t
t/050_metaclasses/003_moose_w_metaclass.t
t/050_metaclasses/004_moose_for_meta.t
t/050_metaclasses/010_extending_and_embedding.t
t/050_metaclasses/011_init_meta.t
t/060_compat/002_moose_respects_base.t
t/060_compat/003_foreign_inheritence.t
t/100_bugs/001_subtype_quote_bug.t
t/100_bugs/002_subtype_conflict_bug.t
t/100_bugs/004_subclass_use_base_bug.t
t/100_bugs/005_inline_reader_bug.t
t/100_bugs/007_reader_precedence_bug.t
t/100_bugs/008_new_w_undef.t
t/100_bugs/009_augment_recursion_bug.t
t/100_bugs/010_immutable_n_default_x2.t
t/100_bugs/011_DEMOLISH_eats_exceptions.t
t/100_bugs/012_DEMOLISH_eats_mini.t
t/100_bugs/016_inheriting_from_roles.t
t/100_bugs/017_type_constraint_messages.t
t/100_bugs/018_immutable_metaclass_does_role.t
t/200_examples/001_example.t
t/200_examples/002_example_Moose_POOP.t
t/200_examples/003_example.t
t/200_examples/004_example_w_DCS.t
t/200_examples/005_example_w_TestDeep.t
t/200_examples/008_record_set_iterator.t
t/300_immutable/001_immutable_moose.t
t/300_immutable/002_apply_roles_to_immutable.t
t/300_immutable/003_immutable_meta_class.t
t/300_immutable/004_inlined_constructors_n_types.t
t/300_immutable/005_multiple_demolish_inline.t
t/300_immutable/006_immutable_nonmoose_subclass.t
t/300_immutable/007_immutable_trigger_from_constructor.t
t/300_immutable/008_immutable_constructor_error.t
t/600_todo_tests/005_moose_and_threads.t