Profile of /usr/local/lib/perl5/site_perl/5.10.1/MooseX/AttributeHelpers/MethodProvider/Bag.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For 05.Domain_and_Item.t
Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:22 2010

File | /usr/local/lib/perl5/site_perl/5.10.1/MooseX/AttributeHelpers/MethodProvider/Bag.pm
Statements Executed | 8
Statement Execution Time | 222µs

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 17µs | 1.38ms | MooseX::AttributeHelpers::MethodProvider::Bag::::BEGIN@2MooseX::AttributeHelpers::MethodProvider::Bag::BEGIN@2
0 | 0 | 0 | 0s | 0s | MooseX::AttributeHelpers::MethodProvider::Bag::::__ANON__[:12]MooseX::AttributeHelpers::MethodProvider::Bag::__ANON__[:12]
0 | 0 | 0 | 0s | 0s | MooseX::AttributeHelpers::MethodProvider::Bag::::__ANON__[:17]MooseX::AttributeHelpers::MethodProvider::Bag::__ANON__[:17]
0 | 0 | 0 | 0s | 0s | MooseX::AttributeHelpers::MethodProvider::Bag::::__ANON__[:22]MooseX::AttributeHelpers::MethodProvider::Bag::__ANON__[:22]
0 | 0 | 0 | 0s | 0s | MooseX::AttributeHelpers::MethodProvider::Bag::::addMooseX::AttributeHelpers::MethodProvider::Bag::add
0 | 0 | 0 | 0s | 0s | MooseX::AttributeHelpers::MethodProvider::Bag::::deleteMooseX::AttributeHelpers::MethodProvider::Bag::delete
0 | 0 | 0 | 0s | 0s | MooseX::AttributeHelpers::MethodProvider::Bag::::resetMooseX::AttributeHelpers::MethodProvider::Bag::reset

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package MooseX::AttributeHelpers::MethodProvider::Bag;
2 | 3 | 188µs | 2 | 2.75ms | # spent 1.38ms (17µs+1.36) within MooseX::AttributeHelpers::MethodProvider::Bag::BEGIN@2 which was called # once (17µs+1.36ms) by MooseX::AttributeHelpers::Trait::Collection::Bag::BEGIN@10 at line 2 use Moose::Role; # spent 1.38ms making 1 call to MooseX::AttributeHelpers::MethodProvider::Bag::BEGIN@2 # spent 1.36ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:389]
3 |  |  |  |  |
4 | 1 | 700ns |  |  | our $VERSION = '0.23';
5 | 1 | 24µs |  |  | $VERSION = eval $VERSION;
6 | 1 | 400ns |  |  | our $AUTHORITY = 'cpan:STEVAN';
7 |  |  |  |  |
8 | 1 | 3µs | 1 | 3.59ms | with 'MooseX::AttributeHelpers::MethodProvider::ImmutableHash'; # spent 3.59ms making 1 call to Moose::Role::with
9 |  |  |  |  |
10 |  |  |  |  | sub add : method {
11 |  |  |  |  | my ($attr, $reader, $writer) = @_;
12 |  |  |  |  | return sub { $reader->($_[0])->{$_[1]}++ };
13 |  |  |  |  | }
14 |  |  |  |  |
15 |  |  |  |  | sub delete : method {
16 |  |  |  |  | my ($attr, $reader, $writer) = @_;
17 |  |  |  |  | return sub { CORE::delete $reader->($_[0])->{$_[1]} };
18 |  |  |  |  | }
19 |  |  |  |  |
20 |  |  |  |  | sub reset : method {
21 |  |  |  |  | my ($attr, $reader, $writer) = @_;
22 |  |  |  |  | return sub { $reader->($_[0])->{$_[1]} = 0 };
23 |  |  |  |  | }
24 |  |  |  |  |
25 | 1 | 6µs |  |  | 1;
26 |  |  |  |  |
27 |  |  |  |  | __END__
28 |  |  |  |  |
29 |  |  |  |  | =pod
30 |  |  |  |  |
31 |  |  |  |  | =head1 NAME
32 |  |  |  |  |
33 |  |  |  |  | MooseX::AttributeHelpers::MethodProvider::Bag
34 |  |  |  |  |
35 |  |  |  |  | =head1 DESCRIPTION
36 |  |  |  |  |
37 |  |  |  |  | This is a role which provides the method generators for
38 |  |  |  |  | L<MooseX::AttributeHelpers::Collection::Bag>.
39 |  |  |  |  |
40 |  |  |  |  | This role is composed from the
41 |  |  |  |  | L<MooseX::AttributeHelpers::Collection::ImmutableHash> role.
42 |  |  |  |  |
43 |  |  |  |  | =head1 METHODS
44 |  |  |  |  |
45 |  |  |  |  | =over 4
46 |  |  |  |  |
47 |  |  |  |  | =item B<meta>
48 |  |  |  |  |
49 |  |  |  |  | =back
50 |  |  |  |  |
51 |  |  |  |  | =head1 PROVIDED METHODS
52 |  |  |  |  |
53 |  |  |  |  | =over 4
54 |  |  |  |  |
55 |  |  |  |  | =item B<count>
56 |  |  |  |  |
57 |  |  |  |  | =item B<delete>
58 |  |  |  |  |
59 |  |  |  |  | =item B<empty>
60 |  |  |  |  |
61 |  |  |  |  | =item B<exists>
62 |  |  |  |  |
63 |  |  |  |  | =item B<get>
64 |  |  |  |  |
65 |  |  |  |  | =item B<keys>
66 |  |  |  |  |
67 |  |  |  |  | =item B<add>
68 |  |  |  |  |
69 |  |  |  |  | =item B<reset>
70 |  |  |  |  |
71 |  |  |  |  | =item B<values>
72 |  |  |  |  |
73 |  |  |  |  | =item B<kv>
74 |  |  |  |  |
75 |  |  |  |  | =back
76 |  |  |  |  |
77 |  |  |  |  | =head1 BUGS
78 |  |  |  |  |
79 |  |  |  |  | All complex software has bugs lurking in it, and this module is no
80 |  |  |  |  | exception. If you find a bug please either email me, or add the bug
81 |  |  |  |  | to cpan-RT.
82 |  |  |  |  |
83 |  |  |  |  | =head1 AUTHOR
84 |  |  |  |  |
85 |  |  |  |  | Stevan Little E<lt>stevan@iinteractive.comE<gt>
86 |  |  |  |  |
87 |  |  |  |  | =head1 COPYRIGHT AND LICENSE
88 |  |  |  |  |
89 |  |  |  |  | Copyright 2007-2009 by Infinity Interactive, Inc.
90 |  |  |  |  |
91 |  |  |  |  | L<http://www.iinteractive.com>
92 |  |  |  |  |
93 |  |  |  |  | This library is free software; you can redistribute it and/or modify
94 |  |  |  |  | it under the same terms as Perl itself.
95 |  |  |  |  |
96 |  |  |  |  | =cut
97 |  |  |  |  |