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