foo
[gitmo/Moose-Autobox.git] / lib / Moose / Autobox / Value.pm
CommitLineData
5f654d8e 1package Moose::Autobox::Value;
6cf5bcf2 2use Moose::Role 'with', 'requires';
5f654d8e 3
4our $VERSION = '0.01';
5
6with 'Moose::Autobox::Defined';
7
6cf5bcf2 8sub do {
9 my ($self, $block) = @_;
10 local $_ = $self;
11 $block->($self);
12}
13
31d40d73 141;
15__END__
16
17=pod
18
19=head1 NAME
20
21Moose::Autobox::Value - the Value role
22
23=head1 SYNOPOSIS
24
25 use Moose::Autobox;
26 use autobox;
27
8937074a 28 # execute a sub on the value
29 print 10->do(sub { $_ * $_ }); # prints 100
31d40d73 30
31=head1 DESCRIPTION
32
8937074a 33This is a role to describes a defined (non-reference) Perl value.
34
260cc81f 35=head1 METHODS
36
37=over 4
38
39=item B<meta>
40
8937074a 41=item B<do (\&block)>
260cc81f 42
43=back
44
31d40d73 45=head1 BUGS
46
47All complex software has bugs lurking in it, and this module is no
48exception. If you find a bug please either email me, or add the bug
49to cpan-RT.
50
51=head1 AUTHOR
52
53Stevan Little E<lt>stevan@iinteractive.comE<gt>
54
55=head1 COPYRIGHT AND LICENSE
56
57Copyright 2006 by Infinity Interactive, Inc.
58
59L<http://www.iinteractive.com>
60
61This library is free software; you can redistribute it and/or modify
62it under the same terms as Perl itself.
63
64=cut