2 package Moose::Autobox;
10 our $VERSION = '0.01';
17 # this doesnt make sense, but
18 # I need to prevent Moose from
20 use base 'Moose::Autobox';
23 with 'Moose::Autobox::Scalar';
25 *does = \&Moose::Object::does;
28 use base 'Moose::Autobox';
30 with 'Moose::Autobox::Array';
32 *does = \&Moose::Object::does;
35 use base 'Moose::Autobox';
37 with 'Moose::Autobox::Hash';
39 *does = \&Moose::Object::does;
42 use base 'Moose::Autobox';
44 with 'Moose::Autobox::Code';
46 *does = \&Moose::Object::does;
49 # confess 'Could not create autobox packages because - ' . $@ if $@;
60 Moose::Autobox - autoboxed for her pleasure
67 'Print squares from 1 to 10'->print;
68 [ 1 .. 10 ]->map(sub { $_ * $_ })->join(', ')->print;
74 +------------------------+-------------------------------+
75 | Identity | Behavioral |
76 +------------------------+-------------------------------+
80 | Scalar* <-|- String, Number <--+ |
82 | Array* <-|- List <------------+ |
86 +------------------------+-------------------------------+
88 * indicates actual autoboxed types
92 - String, Number & List are currently the only Values.
94 - Indexed is pretty much an interface, we probably will
95 need more of these (see Smalltalk Collection Trait
100 All complex software has bugs lurking in it, and this module is no
101 exception. If you find a bug please either email me, or add the bug
106 Stevan Little E<lt>stevan@iinteractive.comE<gt>
108 =head1 COPYRIGHT AND LICENSE
110 Copyright 2006 by Infinity Interactive, Inc.
112 L<http://www.iinteractive.com>
114 This library is free software; you can redistribute it and/or modify
115 it under the same terms as Perl itself.