File | /usr/local/lib/perl5/site_perl/5.10.1/MooseX/AttributeHelpers/Trait/Collection/Array.pm |
Statements Executed | 15 |
Statement Execution Time | 294µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.24ms | 7.54ms | BEGIN@9 | MooseX::AttributeHelpers::Trait::Collection::Array::
1 | 1 | 1 | 15µs | 1.50ms | BEGIN@3 | MooseX::AttributeHelpers::Trait::Collection::Array::
1 | 1 | 1 | 7µs | 125µs | BEGIN@22 | MooseX::AttributeHelpers::Trait::Collection::Array::
0 | 0 | 0 | 0s | 0s | helper_type | MooseX::AttributeHelpers::Trait::Collection::Array::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | |||||
2 | package MooseX::AttributeHelpers::Trait::Collection::Array; | ||||
3 | 3 | 64µs | 2 | 2.99ms | # spent 1.50ms (15µs+1.49) within MooseX::AttributeHelpers::Trait::Collection::Array::BEGIN@3 which was called
# once (15µs+1.49ms) by MooseX::AttributeHelpers::BEGIN@18 at line 3 # spent 1.50ms making 1 call to MooseX::AttributeHelpers::Trait::Collection::Array::BEGIN@3
# spent 1.49ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:389] |
4 | |||||
5 | 1 | 700ns | our $VERSION = '0.23'; | ||
6 | 1 | 16µs | $VERSION = eval $VERSION; | ||
7 | 1 | 400ns | our $AUTHORITY = 'cpan:STEVAN'; | ||
8 | |||||
9 | 3 | 157µs | 1 | 7.54ms | # spent 7.54ms (1.24+6.30) within MooseX::AttributeHelpers::Trait::Collection::Array::BEGIN@9 which was called
# once (1.24ms+6.30ms) by MooseX::AttributeHelpers::BEGIN@18 at line 9 # spent 7.54ms making 1 call to MooseX::AttributeHelpers::Trait::Collection::Array::BEGIN@9 |
10 | |||||
11 | 1 | 3µs | 1 | 1.97ms | with 'MooseX::AttributeHelpers::Trait::Collection'; # spent 1.97ms making 1 call to Moose::Role::with |
12 | |||||
13 | 1 | 2µs | 1 | 97µs | has 'method_provider' => ( # spent 97µs making 1 call to Moose::Role::has |
14 | is => 'ro', | ||||
15 | isa => 'ClassName', | ||||
16 | predicate => 'has_method_provider', | ||||
17 | default => 'MooseX::AttributeHelpers::MethodProvider::Array' | ||||
18 | ); | ||||
19 | |||||
20 | sub helper_type { 'ArrayRef' } | ||||
21 | |||||
22 | 3 | 35µs | 2 | 243µs | # spent 125µs (7+118) within MooseX::AttributeHelpers::Trait::Collection::Array::BEGIN@22 which was called
# once (7µs+118µs) by MooseX::AttributeHelpers::BEGIN@18 at line 22 # spent 125µs making 1 call to MooseX::AttributeHelpers::Trait::Collection::Array::BEGIN@22
# spent 118µs making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:478] |
23 | |||||
24 | 1 | 16µs | 1; | ||
25 | |||||
26 | __END__ | ||||
27 | |||||
28 | =pod | ||||
29 | |||||
30 | =head1 NAME | ||||
31 | |||||
32 | MooseX::AttributeHelpers::Collection::Array | ||||
33 | |||||
34 | =head1 SYNOPSIS | ||||
35 | |||||
36 | package Stuff; | ||||
37 | use Moose; | ||||
38 | use MooseX::AttributeHelpers; | ||||
39 | |||||
40 | has 'options' => ( | ||||
41 | metaclass => 'Collection::Array', | ||||
42 | is => 'ro', | ||||
43 | isa => 'ArrayRef[Int]', | ||||
44 | default => sub { [] }, | ||||
45 | provides => { | ||||
46 | 'push' => 'add_options', | ||||
47 | 'pop' => 'remove_last_option', | ||||
48 | } | ||||
49 | ); | ||||
50 | |||||
51 | =head1 DESCRIPTION | ||||
52 | |||||
53 | This module provides an Array attribute which provides a number of | ||||
54 | array operations. See L<MooseX::AttributeHelpers::MethodProvider::Array> | ||||
55 | for more details. | ||||
56 | |||||
57 | =head1 METHODS | ||||
58 | |||||
59 | =over 4 | ||||
60 | |||||
61 | =item B<meta> | ||||
62 | |||||
63 | =item B<method_provider> | ||||
64 | |||||
65 | =item B<has_method_provider> | ||||
66 | |||||
67 | =item B<helper_type> | ||||
68 | |||||
69 | =back | ||||
70 | |||||
71 | =head1 BUGS | ||||
72 | |||||
73 | All complex software has bugs lurking in it, and this module is no | ||||
74 | exception. If you find a bug please either email me, or add the bug | ||||
75 | to cpan-RT. | ||||
76 | |||||
77 | =head1 AUTHOR | ||||
78 | |||||
79 | Stevan Little E<lt>stevan@iinteractive.comE<gt> | ||||
80 | |||||
81 | =head1 COPYRIGHT AND LICENSE | ||||
82 | |||||
83 | Copyright 2007-2009 by Infinity Interactive, Inc. | ||||
84 | |||||
85 | L<http://www.iinteractive.com> | ||||
86 | |||||
87 | This library is free software; you can redistribute it and/or modify | ||||
88 | it under the same terms as Perl itself. | ||||
89 | |||||
90 | =cut |