← Index
Performance Profile   « block view • line view • sub view »
For t/test-parsing
  Run on Sun Nov 14 09:49:57 2010
Reported on Sun Nov 14 09:50:11 2010

File /usr/local/lib/perl/5.10.0/Moose/Meta/Method.pm
Statements Executed 79
Total Time 0.0005508 seconds
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3162238µs238µsMoose::Meta::Method::::_inline_throw_errorMoose::Meta::Method::_inline_throw_error
0000s0sMoose::Meta::Method::::BEGINMoose::Meta::Method::BEGIN
0000s0sMoose::Meta::Method::::_error_throwerMoose::Meta::Method::_error_thrower
0000s0sMoose::Meta::Method::::throw_errorMoose::Meta::Method::throw_error
LineStmts.Exclusive
Time
Avg.Code
1package Moose::Meta::Method;
2
3329µs10µsuse strict;
# spent 13µs making 1 call to strict::import
4357µs19µsuse warnings;
# spent 24µs making 1 call to warnings::import
5
61700ns700nsour $VERSION = '1.15';
7128µs28µs$VERSION = eval $VERSION;
81600ns600nsour $AUTHORITY = 'cpan:STEVAN';
9
10334µs11µsuse Class::MOP::MiniTrait;
# spent 3µs making 1 call to import
11
123225µs75µsuse base 'Class::MOP::Method';
# spent 78µs making 1 call to base::import, max recursion depth 1
13
14113µs13µsClass::MOP::MiniTrait::apply(__PACKAGE__, 'Moose::Meta::Object::Trait');
# spent 3.48ms making 1 call to Class::MOP::MiniTrait::apply
15
16sub _error_thrower {
17 my $self = shift;
18 ( ref $self && $self->associated_metaclass ) || "Moose::Meta::Class";
19}
20
21sub throw_error {
22 my $self = shift;
23 my $inv = $self->_error_thrower;
24 unshift @_, "message" if @_ % 2 == 1;
25 unshift @_, method => $self if ref $self;
26 unshift @_, $inv;
27 my $handler = $inv->can("throw_error");
28 goto $handler; # to avoid incrementing depth by 1
29}
30
31
# spent 238µs within Moose::Meta::Method::_inline_throw_error which was called 31 times, avg 8µs/call: # 11 times (71µs+0s) by Moose::Meta::Method::Constructor::_generate_type_constraint_check at line 321 of /usr/local/lib/perl/5.10.0/Moose/Meta/Method/Constructor.pm, avg 6µs/call # 7 times (54µs+0s) by Moose::Meta::Method::Constructor::_generate_BUILDARGS at line 147 of /usr/local/lib/perl/5.10.0/Moose/Meta/Method/Constructor.pm, avg 8µs/call # 6 times (55µs+0s) by Moose::Meta::Method::Accessor::_inline_check_constraint at line 167 of /usr/local/lib/perl/5.10.0/Moose/Meta/Method/Accessor.pm, avg 9µs/call # 3 times (28µs+0s) by Moose::Meta::Method::Accessor::_generate_reader_method_inline at line 101 of /usr/local/lib/perl/5.10.0/Moose/Meta/Method/Accessor.pm, avg 10µs/call # 3 times (19µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 207 of /usr/local/lib/perl/5.10.0/Moose/Meta/Method/Constructor.pm, avg 6µs/call # once (10µs+0s) by Moose::Meta::Method::Accessor::_inline_check_required at line 187 of /usr/local/lib/perl/5.10.0/Moose/Meta/Method/Accessor.pm
sub _inline_throw_error {
323162µs2µs my ( $self, $msg, $args ) = @_;
333194µs3µs "\$meta->throw_error($msg" . ($args ? ", $args" : "") . ")"; # FIXME makes deparsing *REALLY* hard
34}
35
3618µs8µs1;
37
38__END__
39
40=pod
41
42=head1 NAME
43
44Moose::Meta::Method - A Moose Method metaclass
45
46=head1 DESCRIPTION
47
48This class is a subclass of L<Class::MOP::Method> that provides
49additional Moose-specific functionality, all of which is private.
50
51To understand this class, you should read the the L<Class::MOP::Method>
52documentation.
53
54=head1 INHERITANCE
55
56C<Moose::Meta::Method> is a subclass of L<Class::MOP::Method>.
57
58=head1 BUGS
59
60See L<Moose/BUGS> for details on reporting bugs.
61
62=head1 AUTHOR
63
64Stevan Little E<lt>stevan@iinteractive.comE<gt>
65
66=head1 COPYRIGHT AND LICENSE
67
68Copyright 2006-2010 by Infinity Interactive, Inc.
69
70L<http://www.iinteractive.com>
71
72This library is free software; you can redistribute it and/or modify
73it under the same terms as Perl itself.
74
75=cut