← 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
13762351µs351µsMoose::Meta::Method::::_inline_throw_errorMoose::Meta::Method::_inline_throw_error
11114µs16µsMoose::Meta::Method::::BEGIN@3Moose::Meta::Method::BEGIN@3
1119µs64µsMoose::Meta::Method::::BEGIN@10Moose::Meta::Method::BEGIN@10
1117µs16µsMoose::Meta::Method::::BEGIN@4Moose::Meta::Method::BEGIN@4
0000s0sMoose::Meta::Method::::_error_throwerMoose::Meta::Method::_error_thrower
0000s0sMoose::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
1package Moose::Meta::Method;
2
3320µs219µ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
4344µs224µ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
61600nsour $VERSION = '0.98';
7118µs$VERSION = eval $VERSION;
81300nsour $AUTHORITY = 'cpan:STEVAN';
9
103150µs264µ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
12sub _error_thrower {
13 my $self = shift;
14 ( ref $self && $self->associated_metaclass ) || "Moose::Meta::Class";
15}
16
17sub 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 {
2813773µs my ( $self, $msg, $args ) = @_;
29137388µs "\$meta->throw_error($msg" . ($args ? ", $args" : "") . ")"; # FIXME makes deparsing *REALLY* hard
30}
31
3217µs1;
33
34__END__
35
36=pod
37
38=head1 NAME
39
40Moose::Meta::Method - A Moose Method metaclass
41
42=head1 DESCRIPTION
43
44This class is a subclass of L<Class::MOP::Method> that provides
45additional Moose-specific functionality, all of which is private.
46
47To understand this class, you should read the the L<Class::MOP::Method>
48documentation.
49
50=head1 INHERITANCE
51
52C<Moose::Meta::Method> is a subclass of L<Class::MOP::Method>.
53
54=head1 BUGS
55
56See L<Moose/BUGS> for details on reporting bugs.
57
58=head1 AUTHOR
59
60Stevan Little E<lt>stevan@iinteractive.comE<gt>
61
62=head1 COPYRIGHT AND LICENSE
63
64Copyright 2006-2010 by Infinity Interactive, Inc.
65
66L<http://www.iinteractive.com>
67
68This library is free software; you can redistribute it and/or modify
69it under the same terms as Perl itself.
70
71=cut