Profile of /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/Method.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:57 2010

File | /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/Method.pm
Statements Executed | 287
Statement Execution Time | 700µs

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
137 | 6 | 2 | 351µs | 351µs | Moose::Meta::Method::::_inline_throw_errorMoose::Meta::Method::_inline_throw_error
1 | 1 | 1 | 14µs | 16µs | Moose::Meta::Method::::BEGIN@3Moose::Meta::Method::BEGIN@3
1 | 1 | 1 | 9µs | 64µs | Moose::Meta::Method::::BEGIN@10Moose::Meta::Method::BEGIN@10
1 | 1 | 1 | 7µs | 16µs | Moose::Meta::Method::::BEGIN@4Moose::Meta::Method::BEGIN@4
0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::::_error_throwerMoose::Meta::Method::_error_thrower
0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::::throw_errorMoose::Meta::Method::throw_error

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

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package Moose::Meta::Method;
2 |  |  |  |  |
3 | 3 | 20µs | 2 | 19µs | # spent 16µs (14+3) within Moose::Meta::Method::BEGIN@3 which was called # once (14µs+3µs) by base::import at line 3 use strict; # spent 16µs making 1 call to Moose::Meta::Method::BEGIN@3 # spent 3µs making 1 call to strict::import
4 | 3 | 44µs | 2 | 24µs | # spent 16µs (7+8) within Moose::Meta::Method::BEGIN@4 which was called # once (7µs+8µs) by base::import at line 4 use warnings; # spent 16µs making 1 call to Moose::Meta::Method::BEGIN@4 # spent 8µs making 1 call to warnings::import
5 |  |  |  |  |
6 | 1 | 600ns |  |  | our $VERSION = '0.98';
7 | 1 | 18µs |  |  | $VERSION = eval $VERSION;
8 | 1 | 300ns |  |  | our $AUTHORITY = 'cpan:STEVAN';
9 |  |  |  |  |
10 | 3 | 150µs | 2 | 64µs | # spent 64µs (9+54) within Moose::Meta::Method::BEGIN@10 which was called # once (9µs+54µs) by base::import at line 10 use base 'Class::MOP::Method'; # spent 64µs making 1 call to Moose::Meta::Method::BEGIN@10 # spent 54µs making 1 call to base::import, recursion: max depth 1, time 54µs
11 |  |  |  |  |
12 |  |  |  |  | sub _error_thrower {
13 |  |  |  |  | my $self = shift;
14 |  |  |  |  | ( ref $self && $self->associated_metaclass ) || "Moose::Meta::Class";
15 |  |  |  |  | }
16 |  |  |  |  |
17 |  |  |  |  | sub throw_error {
18 |  |  |  |  | my $self = shift;
19 |  |  |  |  | my $inv = $self->_error_thrower;
20 |  |  |  |  | unshift @_, "message" if @_ % 2 == 1;
21 |  |  |  |  | unshift @_, method => $self if ref $self;
22 |  |  |  |  | unshift @_, $inv;
23 |  |  |  |  | my $handler = $inv->can("throw_error");
24 |  |  |  |  | goto $handler; # to avoid incrementing depth by 1
25 |  |  |  |  | }
26 |  |  |  |  |
27 |  |  |  |  | # spent 351µs within Moose::Meta::Method::_inline_throw_error which was called 137 times, avg 3µs/call: # 68 times (196µs+0s) by Moose::Meta::Method::Accessor::_generate_reader_method_inline at line 95 of Moose/Meta/Method/Accessor.pm, avg 3µs/call # 35 times (82µs+0s) by Moose::Meta::Method::Accessor::_inline_check_constraint at line 132 of Moose/Meta/Method/Accessor.pm, avg 2µs/call # 15 times (29µs+0s) by Moose::Meta::Method::Constructor::_generate_type_constraint_check at line 328 of Moose/Meta/Method/Constructor.pm, avg 2µs/call # 12 times (24µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 200 of Moose/Meta/Method/Constructor.pm, avg 2µs/call # 6 times (18µs+0s) by Moose::Meta::Method::Constructor::_generate_BUILDARGS at line 137 of Moose/Meta/Method/Constructor.pm, avg 3µs/call # once (2µs+0s) by Moose::Meta::Method::Accessor::_inline_check_lazy at line 167 of Moose/Meta/Method/Accessor.pm sub _inline_throw_error {
28 | 137 | 73µs |  |  | my ( $self, $msg, $args ) = @_;
29 | 137 | 388µs |  |  | "\$meta->throw_error($msg" . ($args ? ", $args" : "") . ")"; # FIXME makes deparsing *REALLY* hard
30 |  |  |  |  | }
31 |  |  |  |  |
32 | 1 | 7µs |  |  | 1;
33 |  |  |  |  |
34 |  |  |  |  | __END__
35 |  |  |  |  |
36 |  |  |  |  | =pod
37 |  |  |  |  |
38 |  |  |  |  | =head1 NAME
39 |  |  |  |  |
40 |  |  |  |  | Moose::Meta::Method - A Moose Method metaclass
41 |  |  |  |  |
42 |  |  |  |  | =head1 DESCRIPTION
43 |  |  |  |  |
44 |  |  |  |  | This class is a subclass of L<Class::MOP::Method> that provides
45 |  |  |  |  | additional Moose-specific functionality, all of which is private.
46 |  |  |  |  |
47 |  |  |  |  | To understand this class, you should read the the L<Class::MOP::Method>
48 |  |  |  |  | documentation.
49 |  |  |  |  |
50 |  |  |  |  | =head1 INHERITANCE
51 |  |  |  |  |
52 |  |  |  |  | C<Moose::Meta::Method> is a subclass of L<Class::MOP::Method>.
53 |  |  |  |  |
54 |  |  |  |  | =head1 BUGS
55 |  |  |  |  |
56 |  |  |  |  | See L<Moose/BUGS> for details on reporting bugs.
57 |  |  |  |  |
58 |  |  |  |  | =head1 AUTHOR
59 |  |  |  |  |
60 |  |  |  |  | Stevan Little E<lt>stevan@iinteractive.comE<gt>
61 |  |  |  |  |
62 |  |  |  |  | =head1 COPYRIGHT AND LICENSE
63 |  |  |  |  |
64 |  |  |  |  | Copyright 2006-2010 by Infinity Interactive, Inc.
65 |  |  |  |  |
66 |  |  |  |  | L<http://www.iinteractive.com>
67 |  |  |  |  |
68 |  |  |  |  | This library is free software; you can redistribute it and/or modify
69 |  |  |  |  | it under the same terms as Perl itself.
70 |  |  |  |  |
71 |  |  |  |  | =cut