foo
[gitmo/Moose-Autobox.git] / lib / Moose / Autobox.pm
CommitLineData
5f654d8e 1
2package Moose::Autobox;
3
4use strict;
5use warnings;
6
252ab1a2 7use Moose qw(confess);
5f654d8e 8use Scalar::Util ();
9
10our $VERSION = '0.01';
11
12sub import {
13 eval q|
14package SCALAR;
15use Moose;
16with 'Moose::Autobox::Scalar';
17
18package ARRAY;
19use Moose;
20with 'Moose::Autobox::Array';
21
22package HASH;
23use Moose;
24with 'Moose::Autobox::Hash';
25
26package CODE;
27use Moose;
28with 'Moose::Autobox::Code';
29 |;
252ab1a2 30 confess 'Could not create autobox packages because - ' . $@ if $@;
5f654d8e 31}
32
331;
34
35__END__
36
37=pod
38
39=head1 NAME
40
41Moose::Autobox - autoboxed for her pleasure
42
43=head1 SYNOPOSIS
44
39894c95 45 use Moose::Autobox;
46 use autobox;
47
48 print "Squares: " . [ 1 .. 10 ]->map(sub { $_ * $_ })->join(', ');
49
5f654d8e 50=head1 DESCRIPTION
51
39894c95 52=head1 ROLES
53
5f654d8e 54 Item
5f654d8e 55 Undef
56 Defined
57 Value
39894c95 58 Scalar*
5f654d8e 59 Ref
39894c95 60 List
61 Array*
62 Hash*
63 Code*
64
65 * indicates actual autoboxed types
5f654d8e 66
67=head1 BUGS
68
69All complex software has bugs lurking in it, and this module is no
70exception. If you find a bug please either email me, or add the bug
71to cpan-RT.
72
73=head1 AUTHOR
74
75Stevan Little E<lt>stevan@iinteractive.comE<gt>
76
77=head1 COPYRIGHT AND LICENSE
78
79Copyright 2006 by Infinity Interactive, Inc.
80
81L<http://www.iinteractive.com>
82
83This library is free software; you can redistribute it and/or modify
84it under the same terms as Perl itself.
85
5f654d8e 86=cut