If you mix string-based names with types created by this module, it will warn,
with a few exceptions. If you are declaring a C<class_type()> or
-c<role_type()> within your type library, or if you use a fully qualified name
+C<role_type()> within your type library, or if you use a fully qualified name
like C<"MyApp::Foo">.
=head1 LIBRARY DEFINITION
sub import {
my ($class, %args) = @_;
- my $callee = caller;
+ my $caller = caller;
# everyone should want this
strict->import;
# inject base class into new library
{ no strict 'refs';
- unshift @{ $callee . '::ISA' }, 'MooseX::Types::Base';
+ unshift @{ $caller . '::ISA' }, 'MooseX::Types::Base';
}
# generate predeclared type helpers
if $type =~ /::/;
# add type to library and remember to export
- $callee->add_type($type);
+ $caller->add_type($type);
push @to_export, $type;
}
- $callee->import({ -full => 1, -into => $callee }, @to_export);
+ $caller->import({ -full => 1, -into => $caller }, @to_export);
}
# run type constraints import
- Moose::Util::TypeConstraints->import({ into => $callee });
+ Moose::Util::TypeConstraints->import({ into => $caller });
# override some with versions that check for syntax errors
- MooseX::Types::CheckedUtilExports->import({ into => $callee });
+ MooseX::Types::CheckedUtilExports->import({ into => $caller });
1;
}