bump version
[gitmo/Moose-Autobox.git] / lib / Moose / Autobox / Scalar.pm
CommitLineData
5f654d8e 1package Moose::Autobox::Scalar;
2use Moose::Role 'with';
3
5efb6885 4our $VERSION = '0.14';
5f654d8e 5
31d40d73 6with 'Moose::Autobox::String',
7 'Moose::Autobox::Number';
e29de5ed 8
9sub flatten { $_[0] }
8b14b072 10sub first { $_[0] }
11sub last { $_[0] }
3f4dd8b7 12sub print { CORE::print $_[0] }
13sub say { CORE::print $_[0], "\n" }
31d40d73 141;
15
16__END__
17
18=pod
19
20=head1 NAME
21
22Moose::Autobox::Scalar - the Scalar role
23
31d40d73 24=head1 DESCRIPTION
25
8937074a 26This is a role to describes a Scalar value, which is defined
27as the combination (union sort of) of a String and a Number.
28
260cc81f 29=head1 METHODS
30
31=over 4
32
33=item B<meta>
34
3f4dd8b7 35=item B<print>
36
37=item B<say>
38
e29de5ed 39=item B<flatten>
40
41Flattening a scalar just returns the scalar. This means that you can say:
42
43 my @array = $input->flatten;
44
45 # Given $input of 5, @array is (5);
46 # Given $input of [ 5, 2, 0], @array is (5, 2, 0)
47
8b14b072 48=item B<first>
49
50As per flatten.
51
52=item B<last>
53
54As per flatten.
55
27fc2bf8 56=back
57
31d40d73 58=head1 BUGS
59
60All complex software has bugs lurking in it, and this module is no
61exception. If you find a bug please either email me, or add the bug
62to cpan-RT.
63
64=head1 AUTHOR
65
66Stevan Little E<lt>stevan@iinteractive.comE<gt>
67
68=head1 COPYRIGHT AND LICENSE
69
ea4e64bf 70Copyright 2006-2008 by Infinity Interactive, Inc.
31d40d73 71
72L<http://www.iinteractive.com>
73
74This library is free software; you can redistribute it and/or modify
75it under the same terms as Perl itself.
76
3f4dd8b7 77=cut