line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Autobox::Value; |
2
|
|
|
|
|
|
|
# ABSTRACT: Moose::Autobox::Value - the Value role |
3
|
14
|
|
|
14
|
|
7390
|
use Moose::Role 'with'; |
|
14
|
|
|
|
|
22
|
|
|
14
|
|
|
|
|
87
|
|
4
|
14
|
|
|
14
|
|
41528
|
use namespace::autoclean; |
|
14
|
|
|
|
|
24
|
|
|
14
|
|
|
|
|
86
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.16'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'Moose::Autobox::Defined'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub do { |
11
|
2
|
|
|
2
|
1
|
10
|
my ($self, $block) = @_; |
12
|
2
|
|
|
|
|
2
|
local $_ = $self; |
13
|
2
|
|
|
|
|
5
|
$block->($self); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__END__ |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=pod |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=encoding UTF-8 |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Moose::Autobox::Value - Moose::Autobox::Value - the Value role |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 VERSION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
version 0.16 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 SYNOPSIS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
use Moose::Autobox; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# execute a sub on the value |
37
|
|
|
|
|
|
|
print 10->do(sub { $_ * $_ }); # prints 100 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 DESCRIPTION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
This is a role to describes a defined (non-reference) Perl value. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 METHODS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=over 4 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=item C<meta> |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item C<do (\&block)> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=back |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SUPPORT |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Moose-Autobox> |
56
|
|
|
|
|
|
|
(or L<bug-Moose-Autobox@rt.cpan.org|mailto:bug-Moose-Autobox@rt.cpan.org>). |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
There is also a mailing list available for users of this distribution, at |
59
|
|
|
|
|
|
|
L<http://lists.perl.org/list/moose.html>. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
There is also an irc channel available for users of this distribution, at |
62
|
|
|
|
|
|
|
L<C<#moose> on C<irc.perl.org>|irc://irc.perl.org/#moose>. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 AUTHOR |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Stevan Little <stevan.little@iinteractive.com> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This software is copyright (c) 2006 by Infinity Interactive, Inc. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
73
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |