File Coverage

blib/lib/Moose/Autobox/Scalar.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


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