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
subtype StrOrArrayRef,
as Str|ArrayRef;
-As with parameterized constrains, this overloading extends to modules using the
+As with parameterized constraints, this overloading extends to modules using the
types you define in a type library.
use Moose;
The 'StrOrArrayRef' will have its stringification activated this causes the
subtype to not be created. Since the bareword type constraints are not strings
you really should not try to treat them that way. You will have to use the ','
-operator instead. The author's of this package realize that all the L<Moose>
-documention and examples nearly uniformly use the '=>' version of the comma
+operator instead. The authors of this package realize that all the L<Moose>
+documentation and examples nearly uniformly use the '=>' version of the comma
operator and this could be an issue if you are converting code.
Patches welcome for discussion.
use TypeAndSubExporter qw(MyStr);
You'll get a '"MyStr" is not exported by the TypeAndSubExporter module' error.
-Upi can workaround by:
+It can be worked around by:
- use Sub::Exporter -setup => { exports => [ qw(something) ] };
+ use Sub::Exporter -setup => { exports => [ qw(something MyStr) ] };