1 package Moose::Autobox::Scalar;
2 use Moose::Role 'with';
6 with 'Moose::Autobox::String',
7 'Moose::Autobox::Number';
12 sub print { CORE::print $_[0] }
13 sub say { CORE::print $_[0], "\n" }
14 sub each_value { $_[1]->($_ = $_[0]) }
24 Moose::Autobox::Scalar - the Scalar role
28 This is a role to describes a Scalar value, which is defined
29 as the combination (union sort of) of a String and a Number.
43 Flattening a scalar just returns the scalar. This means that you can say:
45 my @array = $input->flatten;
47 # Given $input of 5, @array is (5);
48 # Given $input of [ 5, 2, 0], @array is (5, 2, 0)
66 All complex software has bugs lurking in it, and this module is no
67 exception. If you find a bug please either email me, or add the bug
72 Stevan Little E<lt>stevan@iinteractive.comE<gt>
74 =head1 COPYRIGHT AND LICENSE
76 Copyright 2006-2008 by Infinity Interactive, Inc.
78 L<http://www.iinteractive.com>
80 This library is free software; you can redistribute it and/or modify
81 it under the same terms as Perl itself.