package Mouse::Tiny;
use base 'Mouse';
+Mouse::Exporter->setup_import_methods(also => 'Mouse');
+
EOF
print { $handle } "1;\n\n";
package Mouse;
use 5.006_002;
-use strict;
-use warnings;
+use Mouse::Exporter; # enables strict and warnings
our $VERSION = '0.37_02';
use Mouse::Meta::Attribute;
use Mouse::Object;
use Mouse::Util::TypeConstraints ();
-use Mouse::Exporter;
Mouse::Exporter->setup_import_methods(
as_is => [qw(
package Mouse::Meta::Attribute;
-use strict;
-use warnings;
+use Mouse::Util qw(:meta); # enables strict and warnings
use Carp ();
-use Mouse::Util qw(:meta);
-
use Mouse::Meta::TypeConstraint;
use Mouse::Meta::Method::Accessor;
package Mouse::Meta::Class;
-use strict;
-use warnings;
+use Mouse::Util qw/:meta get_linear_isa not_supported/; # enables strict and warnings
use Scalar::Util qw/blessed weaken/;
-use Mouse::Util qw/:meta get_linear_isa not_supported/;
-
use Mouse::Meta::Method::Constructor;
use Mouse::Meta::Method::Destructor;
use Mouse::Meta::Module;
package Mouse::Meta::Method;
-use strict;
-use warnings;
-
-use Mouse::Util qw(:meta);
+use Mouse::Util qw(:meta); # enables strict and warnings
use overload
'&{}' => 'body',
package Mouse::Meta::Method::Accessor;
-use strict;
-use warnings;
+use Mouse::Util; # enables strict and warnings
use Scalar::Util qw(blessed);
sub _generate_accessor{
package Mouse::Meta::Method::Constructor;
-use strict;
-use warnings;
+use Mouse::Util; # enables strict and warnings
sub _generate_constructor_method {
my ($class, $metaclass, $args) = @_;
package Mouse::Meta::Method::Destructor;
-use strict;
-use warnings;
+use Mouse::Util; # enables strict and warnings
sub _empty_destroy{ }
package Mouse::Meta::Module;
-use strict;
-use warnings;
+use Mouse::Util qw/:meta get_code_package load_class not_supported/; # enables strict and warnings
use Carp ();
use Scalar::Util qw/blessed weaken/;
-use Mouse::Util qw/:meta get_code_package not_supported load_class/;
-
-
my %METAS;
sub _metaclass_cache { # DEPRECATED
package Mouse::Meta::Role;
-use strict;
-use warnings;
+use Mouse::Util qw(:meta not_supported english_list); # enables strict and warnings
-use Mouse::Util qw(:meta not_supported english_list get_code_info);
use Mouse::Meta::Module;
our @ISA = qw(Mouse::Meta::Module);
package Mouse::Meta::Role::Method;
-use strict;
-use warnings;
+use Mouse::Util; # enables strict and warnings
use Mouse::Meta::Method;
our @ISA = qw(Mouse::Meta::Method);
1;
-
__END__
=head1 NAME
package Mouse::Meta::TypeConstraint;
-use strict;
-use warnings;
+use Mouse::Util qw(:meta); # enables strict and warnings
use overload
'""' => sub { shift->{name} }, # stringify to tc name
use Carp qw(confess);
use Scalar::Util qw(blessed reftype);
-use Mouse::Util qw(:meta);
-
my $null_check = sub { 1 };
sub new {
package Mouse::Object;
-use strict;
-use warnings;
-
-use Mouse::Util qw(does dump);
+use Mouse::Util qw(does dump); # enables strict and warnings
sub new {
my $class = shift;
package Mouse::Role;
-use strict;
-use warnings;
+use Mouse::Util qw(not_supported); # enables strict and warnings
use Carp ();
use Scalar::Util ();
-use Mouse::Util qw(not_supported);
use Mouse ();
-
use Mouse::Exporter;
Mouse::Exporter->setup_import_methods(
package Mouse::Util;
-use strict;
-use warnings;
-
-use Exporter;
+use Mouse::Exporter; # enables strict and warnings
use Carp qw(confess);
use B ();
use constant _MOUSE_VERBOSE => !!$ENV{MOUSE_VERBOSE};
-our @ISA = qw(Exporter);
-our @EXPORT_OK = qw(
- find_meta
- does_role
- resolve_metaclass_alias
- apply_all_roles
- english_list
+Mouse::Exporter->setup_import_methods(
+ as_is => [qw(
+ find_meta
+ does_role
+ resolve_metaclass_alias
+ apply_all_roles
+ english_list
- load_class
- is_class_loaded
+ load_class
+ is_class_loaded
- get_linear_isa
- get_code_info
+ get_linear_isa
+ get_code_info
- get_code_package
+ get_code_package
- not_supported
+ not_supported
- does meta dump
- _MOUSE_VERBOSE
-);
-our %EXPORT_TAGS = (
- all => \@EXPORT_OK,
- meta => [qw(does meta dump _MOUSE_VERBOSE)],
+ does meta dump
+ _MOUSE_VERBOSE
+ )],
+ groups => {
+ default => [], # export no functions by default
+ meta => [qw(does meta dump _MOUSE_VERBOSE)],
+ },
+ _export_to_main => 1,
);
# aliases as public APIs
-
# it must be 'require', not 'use', because Mouse::Meta::Module depends on Mouse::Util
require Mouse::Meta::Module; # for the entities of metaclass cache utilities
package Mouse::Util::TypeConstraints;
-use strict;
-use warnings;
-
-use Exporter;
+use Mouse::Util qw(does_role not_supported); # enables strict and warnings
use Carp qw(confess);
use Scalar::Util qw/blessed looks_like_number openhandle/;
-use Mouse::Util qw(does_role not_supported);
use Mouse::Meta::TypeConstraint;
+use Mouse::Exporter;
+
+Mouse::Exporter->setup_import_methods(
+ as_is => [qw(
+ as where message from via
+ type subtype coerce class_type role_type enum
+ find_type_constraint
+ )],
-our @ISA = qw(Exporter);
-our @EXPORT = qw(
- as where message from via type subtype coerce class_type role_type enum
- find_type_constraint
+ _export_to_main => 1,
);
my %TYPE;