1package MooseX::Types::Common; # git description: v0.001013-15-gb03d3d2
2# ABSTRACT: A library of commonly used type constraints
3# KEYWORDS: moose types classes objects constraints declare libraries strings numbers
4
5our $VERSION = '0.001014';
6
7use strict;
8use warnings;
9use Carp ();
10
11sub import {
12    my $self = shift;
13    return unless @_;
14    Carp::cluck("Tried to import the symbols " . join(', ', @_)
15        . " from MooseX::Types::Common.\nDid you mean "
16        . "MooseX::Types::Common::String or MooseX::Type::Common::Numeric?");
17}
18
191;
20
21__END__
22
23=pod
24
25=encoding UTF-8
26
27=head1 NAME
28
29MooseX::Types::Common - A library of commonly used type constraints
30
31=head1 VERSION
32
33version 0.001014
34
35=head1 SYNOPSIS
36
37    use MooseX::Types::Common::String qw/SimpleStr/;
38    has short_str => (is => 'rw', isa => SimpleStr);
39
40    ...
41    #this will fail
42    $object->short_str("string\nwith\nbreaks");
43
44
45    use MooseX::Types::Common::Numeric qw/PositiveInt/;
46    has count => (is => 'rw', isa => PositiveInt);
47
48    ...
49    #this will fail
50    $object->count(-33);
51
52=head1 DESCRIPTION
53
54A set of commonly-used type constraints that do not ship with Moose by default.
55
56=head1 SEE ALSO
57
58=over
59
60=item * L<MooseX::Types::Common::String>
61
62=item * L<MooseX::Types::Common::Numeric>
63
64=item * L<MooseX::Types>
65
66=item * L<Moose::Util::TypeConstraints>
67
68=back
69
70=head1 ORIGIN
71
72This distribution was extracted from the L<Reaction> code base by Guillermo
73Roditi (groditi).
74
75=head1 SUPPORT
76
77Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types-Common>
78(or L<bug-MooseX-Types-Common@rt.cpan.org|mailto:bug-MooseX-Types-Common@rt.cpan.org>).
79
80There is also a mailing list available for users of this distribution, at
81L<http://lists.perl.org/list/moose.html>.
82
83There is also an irc channel available for users of this distribution, at
84L<C<#moose> on C<irc.perl.org>|irc://irc.perl.org/#moose>.
85
86=head1 AUTHORS
87
88=over 4
89
90=item *
91
92Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>)
93
94=item *
95
96K. James Cheetham <jamie@shadowcatsystems.co.uk>
97
98=item *
99
100Guillermo Roditi <groditi@gmail.com>
101
102=back
103
104=head1 CONTRIBUTORS
105
106=for stopwords Karen Etheridge Justin Hunter Dave Rolsky Tomas Doran Toby Inkster Gregory Oschwald Denis Ibaev Graham Knop Caleb Cushing
107
108=over 4
109
110=item *
111
112Karen Etheridge <ether@cpan.org>
113
114=item *
115
116Justin Hunter <justin.d.hunter@gmail.com>
117
118=item *
119
120Dave Rolsky <autarch@urth.org>
121
122=item *
123
124Tomas Doran <bobtfish@bobtfish.net>
125
126=item *
127
128Toby Inkster <tobyink@cpan.org>
129
130=item *
131
132Gregory Oschwald <oschwald@gmail.com>
133
134=item *
135
136Denis Ibaev <dionys@gmail.com>
137
138=item *
139
140Graham Knop <haarg@haarg.org>
141
142=item *
143
144Gregory Oschwald <goschwald@maxmind.com>
145
146=item *
147
148Caleb Cushing <xenoterracide@gmail.com>
149
150=back
151
152=head1 COPYRIGHT AND LICENSE
153
154This software is copyright (c) 2009 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>).
155
156This is free software; you can redistribute it and/or modify it under
157the same terms as the Perl 5 programming language system itself.
158
159=cut
160