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