Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose/Meta/Role/Application.pm |
Statements | Executed 158 statements in 1.05ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
4 | 1 | 1 | 200µs | 14.9ms | apply | Moose::Meta::Role::Application::
15 | 1 | 1 | 104µs | 140µs | is_method_excluded | Moose::Meta::Role::Application::
15 | 1 | 1 | 91µs | 125µs | is_method_aliased | Moose::Meta::Role::Application::
4 | 1 | 1 | 45µs | 256µs | new | Moose::Meta::Role::Application::
4 | 1 | 1 | 26µs | 134µs | apply_before_method_modifiers | Moose::Meta::Role::Application::
4 | 1 | 1 | 20µs | 91µs | apply_after_method_modifiers | Moose::Meta::Role::Application::
4 | 1 | 1 | 20µs | 91µs | apply_around_method_modifiers | Moose::Meta::Role::Application::
4 | 1 | 1 | 16µs | 16µs | __ANON__[:23] | Moose::Meta::Role::Application::
4 | 1 | 1 | 15µs | 15µs | __ANON__[:16] | Moose::Meta::Role::Application::
1 | 1 | 1 | 13µs | 631µs | BEGIN@11 | Moose::Meta::Role::Application::
1 | 1 | 1 | 10µs | 10µs | BEGIN@2 | Moose::Meta::Role::Application::
1 | 1 | 1 | 9µs | 14µs | BEGIN@9 | Moose::Meta::Role::Application::
1 | 1 | 1 | 8µs | 25µs | BEGIN@10 | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | apply_attributes | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | apply_method_modifiers | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | apply_methods | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | apply_override_method_modifiers | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | check_required_attributes | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | check_required_methods | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | check_role_exclusions | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | is_aliased_method | Moose::Meta::Role::Application::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Moose::Meta::Role::Application; | ||||
2 | # spent 10µs within Moose::Meta::Role::Application::BEGIN@2 which was called:
# once (10µs+0s) by Moose::BEGIN@38 at line 4 | ||||
3 | 1 | 5µs | $Moose::Meta::Role::Application::AUTHORITY = 'cpan:STEVAN'; | ||
4 | 1 | 29µs | 1 | 10µs | } # spent 10µs making 1 call to Moose::Meta::Role::Application::BEGIN@2 |
5 | { | ||||
6 | 2 | 1µs | $Moose::Meta::Role::Application::VERSION = '2.0602'; | ||
7 | } | ||||
8 | |||||
9 | 3 | 19µs | 2 | 18µs | # spent 14µs (9+5) within Moose::Meta::Role::Application::BEGIN@9 which was called:
# once (9µs+5µs) by Moose::BEGIN@38 at line 9 # spent 14µs making 1 call to Moose::Meta::Role::Application::BEGIN@9
# spent 5µs making 1 call to strict::import |
10 | 3 | 20µs | 2 | 42µs | # spent 25µs (8+17) within Moose::Meta::Role::Application::BEGIN@10 which was called:
# once (8µs+17µs) by Moose::BEGIN@38 at line 10 # spent 25µs making 1 call to Moose::Meta::Role::Application::BEGIN@10
# spent 17µs making 1 call to warnings::import |
11 | 3 | 461µs | 2 | 1.25ms | # spent 631µs (13+618) within Moose::Meta::Role::Application::BEGIN@11 which was called:
# once (13µs+618µs) by Moose::BEGIN@38 at line 11 # spent 631µs making 1 call to Moose::Meta::Role::Application::BEGIN@11
# spent 618µs making 1 call to metaclass::import |
12 | |||||
13 | __PACKAGE__->meta->add_attribute('method_exclusions' => ( | ||||
14 | init_arg => '-excludes', | ||||
15 | reader => 'get_method_exclusions', | ||||
16 | 4 | 24µs | # spent 15µs within Moose::Meta::Role::Application::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose/Meta/Role/Application.pm:16] which was called 4 times, avg 4µs/call:
# 4 times (15µs+0s) by Moose::Meta::Role::Application::ToClass::_new at line 24 of (eval 212)[Eval/Closure.pm:125], avg 4µs/call | ||
17 | 1 | 11µs | 3 | 470µs | Class::MOP::_definition_context(), # spent 438µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute
# spent 23µs making 1 call to Moose::Meta::Role::Application::meta
# spent 9µs making 1 call to Class::MOP::_definition_context |
18 | )); | ||||
19 | |||||
20 | __PACKAGE__->meta->add_attribute('method_aliases' => ( | ||||
21 | init_arg => '-alias', | ||||
22 | reader => 'get_method_aliases', | ||||
23 | 4 | 25µs | # spent 16µs within Moose::Meta::Role::Application::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose/Meta/Role/Application.pm:23] which was called 4 times, avg 4µs/call:
# 4 times (16µs+0s) by Moose::Meta::Role::Application::ToClass::_new at line 18 of (eval 212)[Eval/Closure.pm:125], avg 4µs/call | ||
24 | 1 | 5µs | 3 | 299µs | Class::MOP::_definition_context(), # spent 283µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute
# spent 11µs making 1 call to Moose::Meta::Role::Application::meta
# spent 5µs making 1 call to Class::MOP::_definition_context |
25 | )); | ||||
26 | |||||
27 | # spent 256µs (45+211) within Moose::Meta::Role::Application::new which was called 4 times, avg 64µs/call:
# 4 times (45µs+211µs) by Moose::Meta::Role::apply at line 470 of Moose/Meta/Role.pm, avg 64µs/call | ||||
28 | 8 | 44µs | my ($class, %params) = @_; | ||
29 | 4 | 211µs | $class->_new(\%params); # spent 211µs making 4 calls to Moose::Meta::Role::Application::ToClass::_new, avg 53µs/call | ||
30 | } | ||||
31 | |||||
32 | # spent 140µs (104+36) within Moose::Meta::Role::Application::is_method_excluded which was called 15 times, avg 9µs/call:
# 15 times (104µs+36µs) by Moose::Meta::Role::Application::ToClass::apply_methods at line 167 of Moose/Meta/Role/Application/ToClass.pm, avg 9µs/call | ||||
33 | 45 | 101µs | my ($self, $method_name) = @_; | ||
34 | 15 | 36µs | foreach (@{$self->get_method_exclusions}) { # spent 36µs making 15 calls to Moose::Meta::Role::Application::get_method_exclusions, avg 2µs/call | ||
35 | return 1 if $_ eq $method_name; | ||||
36 | } | ||||
37 | return 0; | ||||
38 | } | ||||
39 | |||||
40 | # spent 125µs (91+34) within Moose::Meta::Role::Application::is_method_aliased which was called 15 times, avg 8µs/call:
# 15 times (91µs+34µs) by Moose::Meta::Role::Application::ToClass::apply_methods at line 179 of Moose/Meta/Role/Application/ToClass.pm, avg 8µs/call | ||||
41 | 30 | 88µs | my ($self, $method_name) = @_; | ||
42 | 15 | 34µs | exists $self->get_method_aliases->{$method_name} ? 1 : 0 # spent 34µs making 15 calls to Moose::Meta::Role::Application::get_method_aliases, avg 2µs/call | ||
43 | } | ||||
44 | |||||
45 | sub is_aliased_method { | ||||
46 | my ($self, $method_name) = @_; | ||||
47 | my %aliased_names = reverse %{$self->get_method_aliases}; | ||||
48 | exists $aliased_names{$method_name} ? 1 : 0; | ||||
49 | } | ||||
50 | |||||
51 | # spent 14.9ms (200µs+14.7) within Moose::Meta::Role::Application::apply which was called 4 times, avg 3.73ms/call:
# 4 times (200µs+14.7ms) by Moose::Meta::Role::Application::ToClass::apply at line 36 of Moose/Meta/Role/Application/ToClass.pm, avg 3.73ms/call | ||||
52 | 40 | 147µs | my $self = shift; | ||
53 | |||||
54 | 4 | 1.42ms | $self->check_role_exclusions(@_); # spent 1.42ms making 4 calls to Moose::Meta::Role::Application::ToClass::check_role_exclusions, avg 355µs/call | ||
55 | 4 | 530µs | $self->check_required_methods(@_); # spent 530µs making 4 calls to Moose::Meta::Role::Application::ToClass::check_required_methods, avg 132µs/call | ||
56 | 4 | 7µs | $self->check_required_attributes(@_); # spent 7µs making 4 calls to Moose::Meta::Role::Application::ToClass::check_required_attributes, avg 2µs/call | ||
57 | |||||
58 | 4 | 6.56ms | $self->apply_attributes(@_); # spent 6.56ms making 4 calls to Moose::Meta::Role::Application::ToClass::apply_attributes, avg 1.64ms/call | ||
59 | 4 | 5.80ms | $self->apply_methods(@_); # spent 5.80ms making 4 calls to Moose::Meta::Role::Application::ToClass::apply_methods, avg 1.45ms/call | ||
60 | |||||
61 | 4 | 102µs | $self->apply_override_method_modifiers(@_); # spent 102µs making 4 calls to Moose::Meta::Role::Application::ToClass::apply_override_method_modifiers, avg 26µs/call | ||
62 | |||||
63 | 4 | 134µs | $self->apply_before_method_modifiers(@_); # spent 134µs making 4 calls to Moose::Meta::Role::Application::apply_before_method_modifiers, avg 34µs/call | ||
64 | 4 | 91µs | $self->apply_around_method_modifiers(@_); # spent 91µs making 4 calls to Moose::Meta::Role::Application::apply_around_method_modifiers, avg 23µs/call | ||
65 | 4 | 91µs | $self->apply_after_method_modifiers(@_); # spent 91µs making 4 calls to Moose::Meta::Role::Application::apply_after_method_modifiers, avg 23µs/call | ||
66 | } | ||||
67 | |||||
68 | sub check_role_exclusions { Carp::croak "Abstract Method" } | ||||
69 | sub check_required_methods { Carp::croak "Abstract Method" } | ||||
70 | sub check_required_attributes { Carp::croak "Abstract Method" } | ||||
71 | |||||
72 | sub apply_attributes { Carp::croak "Abstract Method" } | ||||
73 | sub apply_methods { Carp::croak "Abstract Method" } | ||||
74 | sub apply_override_method_modifiers { Carp::croak "Abstract Method" } | ||||
75 | sub apply_method_modifiers { Carp::croak "Abstract Method" } | ||||
76 | |||||
77 | 4 | 23µs | 4 | 109µs | # spent 134µs (26+109) within Moose::Meta::Role::Application::apply_before_method_modifiers which was called 4 times, avg 34µs/call:
# 4 times (26µs+109µs) by Moose::Meta::Role::Application::apply at line 63, avg 34µs/call # spent 109µs making 4 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 27µs/call |
78 | 4 | 18µs | 4 | 71µs | # spent 91µs (20+71) within Moose::Meta::Role::Application::apply_around_method_modifiers which was called 4 times, avg 23µs/call:
# 4 times (20µs+71µs) by Moose::Meta::Role::Application::apply at line 64, avg 23µs/call # spent 71µs making 4 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 18µs/call |
79 | 4 | 22µs | 4 | 71µs | # spent 91µs (20+71) within Moose::Meta::Role::Application::apply_after_method_modifiers which was called 4 times, avg 23µs/call:
# 4 times (20µs+71µs) by Moose::Meta::Role::Application::apply at line 65, avg 23µs/call # spent 71µs making 4 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 18µs/call |
80 | |||||
81 | 1 | 10µs | 1; | ||
82 | |||||
83 | # ABSTRACT: A base class for role application | ||||
84 | |||||
- - | |||||
87 | =pod | ||||
88 | |||||
89 | =head1 NAME | ||||
90 | |||||
91 | Moose::Meta::Role::Application - A base class for role application | ||||
92 | |||||
93 | =head1 VERSION | ||||
94 | |||||
95 | version 2.0602 | ||||
96 | |||||
97 | =head1 DESCRIPTION | ||||
98 | |||||
99 | This is the abstract base class for role applications. | ||||
100 | |||||
101 | The API for this class and its subclasses still needs some | ||||
102 | consideration, and is intentionally not yet documented. | ||||
103 | |||||
104 | =head2 METHODS | ||||
105 | |||||
106 | =over 4 | ||||
107 | |||||
108 | =item B<new> | ||||
109 | |||||
110 | =item B<meta> | ||||
111 | |||||
112 | =item B<get_method_exclusions> | ||||
113 | |||||
114 | =item B<is_method_excluded> | ||||
115 | |||||
116 | =item B<get_method_aliases> | ||||
117 | |||||
118 | =item B<is_aliased_method> | ||||
119 | |||||
120 | =item B<is_method_aliased> | ||||
121 | |||||
122 | =item B<apply> | ||||
123 | |||||
124 | =item B<check_role_exclusions> | ||||
125 | |||||
126 | =item B<check_required_methods> | ||||
127 | |||||
128 | =item B<check_required_attributes> | ||||
129 | |||||
130 | =item B<apply_attributes> | ||||
131 | |||||
132 | =item B<apply_methods> | ||||
133 | |||||
134 | =item B<apply_method_modifiers> | ||||
135 | |||||
136 | =item B<apply_before_method_modifiers> | ||||
137 | |||||
138 | =item B<apply_after_method_modifiers> | ||||
139 | |||||
140 | =item B<apply_around_method_modifiers> | ||||
141 | |||||
142 | =item B<apply_override_method_modifiers> | ||||
143 | |||||
144 | =back | ||||
145 | |||||
146 | =head1 BUGS | ||||
147 | |||||
148 | See L<Moose/BUGS> for details on reporting bugs. | ||||
149 | |||||
150 | =head1 AUTHOR | ||||
151 | |||||
152 | Moose is maintained by the Moose Cabal, along with the help of many contributors. See L<Moose/CABAL> and L<Moose/CONTRIBUTORS> for details. | ||||
153 | |||||
154 | =head1 COPYRIGHT AND LICENSE | ||||
155 | |||||
156 | This software is copyright (c) 2012 by Infinity Interactive, Inc.. | ||||
157 | |||||
158 | This is free software; you can redistribute it and/or modify it under | ||||
159 | the same terms as the Perl 5 programming language system itself. | ||||
160 | |||||
161 | =cut | ||||
162 | |||||
163 | |||||
164 | __END__ |