← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 01.HTTP.t
  Run on Tue May 4 15:25:55 2010
Reported on Tue May 4 15:26:08 2010

File /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/Method.pm
Statements Executed 31
Statement Execution Time 874µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
93229µs29µsMoose::Meta::Method::::_inline_throw_errorMoose::Meta::Method::_inline_throw_error
11114µs16µsMoose::Meta::Method::::BEGIN@3Moose::Meta::Method::BEGIN@3
1118µs66µsMoose::Meta::Method::::BEGIN@10Moose::Meta::Method::BEGIN@10
1116µs15µ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
4338µs224µs
# spent 15µs (6+9) within Moose::Meta::Method::BEGIN@4 which was called # once (6µs+9µs) by base::import at line 4
use warnings;
# spent 15µs making 1 call to Moose::Meta::Method::BEGIN@4 # spent 9µs making 1 call to warnings::import
5
613µsour $VERSION = '0.98';
7178µs$VERSION = eval $VERSION;
811µsour $AUTHORITY = 'cpan:STEVAN';
9
103678µs266µs
# spent 66µs (8+57) within Moose::Meta::Method::BEGIN@10 which was called # once (8µs+57µs) by base::import at line 10
use base 'Class::MOP::Method';
# spent 66µs making 1 call to Moose::Meta::Method::BEGIN@10 # spent 57µs making 1 call to base::import, recursion: max depth 1, time 57µ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 29µs within Moose::Meta::Method::_inline_throw_error which was called 9 times, avg 3µs/call: # 6 times (22µs+0s) by Moose::Meta::Method::Accessor::_generate_reader_method_inline at line 95 of Moose/Meta/Method/Accessor.pm, avg 4µs/call # 2 times (5µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 200 of Moose/Meta/Method/Constructor.pm, avg 2µs/call # once (2µs+0s) by Moose::Meta::Method::Constructor::_generate_BUILDARGS at line 137 of Moose/Meta/Method/Constructor.pm
sub _inline_throw_error {
281838µs my ( $self, $msg, $args ) = @_;
29 "\$meta->throw_error($msg" . ($args ? ", $args" : "") . ")"; # FIXME makes deparsing *REALLY* hard
30}
31
32118µ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