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;
77 Scalar* <-|- String, Number <--+
79 Array* <-|- List <------------+
83 * indicates actual autoboxed types
87 - String, Number & List are currently the only Values.
89 - Indexed is pretty much an interface, we probably will
90 need more of these (see Smalltalk Collection Trait
95 All complex software has bugs lurking in it, and this module is no
96 exception. If you find a bug please either email me, or add the bug
101 Stevan Little E<lt>stevan@iinteractive.comE<gt>
103 =head1 COPYRIGHT AND LICENSE
105 Copyright 2006 by Infinity Interactive, Inc.
107 L<http://www.iinteractive.com>
109 This library is free software; you can redistribute it and/or modify
110 it under the same terms as Perl itself.