← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:41 2014

Filename/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Meta/Method/Constructor.pm
StatementsExecuted 29 statements in 751µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111246µs2.49msMoose::Meta::Method::Constructor::::newMoose::Meta::Method::Constructor::new
11112µs2.24msMoose::Meta::Method::Constructor::::_initialize_bodyMoose::Meta::Method::Constructor::_initialize_body
11111µs11µsMoose::Meta::Method::Constructor::::BEGIN@3Moose::Meta::Method::Constructor::BEGIN@3
11110µs51µsMoose::Meta::Method::Constructor::::BEGIN@16Moose::Meta::Method::Constructor::BEGIN@16
1119µs14µsMoose::Meta::Method::Constructor::::BEGIN@11Moose::Meta::Method::Constructor::BEGIN@11
1119µs52µsMoose::Meta::Method::Constructor::::BEGIN@15Moose::Meta::Method::Constructor::BEGIN@15
1119µs150µsMoose::Meta::Method::Constructor::::BEGIN@18Moose::Meta::Method::Constructor::BEGIN@18
1119µs44µsMoose::Meta::Method::Constructor::::BEGIN@14Moose::Meta::Method::Constructor::BEGIN@14
1118µs23µsMoose::Meta::Method::Constructor::::BEGIN@10Moose::Meta::Method::Constructor::BEGIN@10
1114µs4µsMoose::Meta::Method::Constructor::::BEGIN@13Moose::Meta::Method::Constructor::BEGIN@13
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1
2package Moose::Meta::Method::Constructor;
3
# spent 11µs within Moose::Meta::Method::Constructor::BEGIN@3 which was called: # once (11µs+0s) by Moose::Meta::Class::BEGIN@25 at line 5
BEGIN {
417µs $Moose::Meta::Method::Constructor::AUTHORITY = 'cpan:STEVAN';
5139µs111µs}
# spent 11µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@3
6{
721µs $Moose::Meta::Method::Constructor::VERSION = '2.1005';
8}
9
10229µs238µs
# spent 23µs (8+15) within Moose::Meta::Method::Constructor::BEGIN@10 which was called: # once (8µs+15µs) by Moose::Meta::Class::BEGIN@25 at line 10
use strict;
# spent 23µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@10 # spent 15µs making 1 call to strict::import
11228µs219µs
# spent 14µs (9+5) within Moose::Meta::Method::Constructor::BEGIN@11 which was called: # once (9µs+5µs) by Moose::Meta::Class::BEGIN@25 at line 11
use warnings;
# spent 14µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@11 # spent 5µs making 1 call to warnings::import
12
13228µs14µs
# spent 4µs within Moose::Meta::Method::Constructor::BEGIN@13 which was called: # once (4µs+0s) by Moose::Meta::Class::BEGIN@25 at line 13
use Carp ();
# spent 4µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@13
14241µs279µs
# spent 44µs (9+35) within Moose::Meta::Method::Constructor::BEGIN@14 which was called: # once (9µs+35µs) by Moose::Meta::Class::BEGIN@25 at line 14
use List::MoreUtils 'any';
# spent 44µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@14 # spent 35µs making 1 call to Exporter::import
15232µs295µs
# spent 52µs (9+43) within Moose::Meta::Method::Constructor::BEGIN@15 which was called: # once (9µs+43µs) by Moose::Meta::Class::BEGIN@25 at line 15
use Scalar::Util 'blessed', 'weaken', 'looks_like_number', 'refaddr';
# spent 52µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@15 # spent 43µs making 1 call to Exporter::import
16236µs292µs
# spent 51µs (10+41) within Moose::Meta::Method::Constructor::BEGIN@16 which was called: # once (10µs+41µs) by Moose::Meta::Class::BEGIN@25 at line 16
use Try::Tiny;
# spent 51µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@16 # spent 41µs making 1 call to Exporter::import
17
181400ns
# spent 150µs (9+141) within Moose::Meta::Method::Constructor::BEGIN@18 which was called: # once (9µs+141µs) by Moose::Meta::Class::BEGIN@25 at line 19
use base 'Moose::Meta::Method',
191249µs2292µs 'Class::MOP::Method::Constructor';
# spent 150µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@18 # spent 141µs making 1 call to base::import
20
21
# spent 2.49ms (246µs+2.24) within Moose::Meta::Method::Constructor::new which was called: # once (246µs+2.24ms) by Class::MOP::Class::_inline_constructor at line 1438 of Class/MOP/Class.pm
sub new {
221700ns my $class = shift;
2313µs my %options = @_;
24
251600ns my $meta = $options{metaclass};
26
2711µs (ref $options{options} eq 'HASH')
28 || $class->throw_error("You must pass a hash of options", data => $options{options});
29
301900ns ($options{package_name} && $options{name})
31 || $class->throw_error("You must supply the package_name and name parameters $Class::MOP::Method::UPGRADE_ERROR_TEXT");
32
3315µs my $self = bless {
34 'body' => undef,
35 'package_name' => $options{package_name},
36 'name' => $options{name},
37 'options' => $options{options},
38 'associated_metaclass' => $meta,
39 'definition_context' => $options{definition_context},
40 '_expected_method_class' => $options{_expected_method_class} || 'Moose::Object',
41 } => $class;
42
43 # we don't want this creating
44 # a cycle in the code, if not
45 # needed
461228µs12µs weaken($self->{'associated_metaclass'});
# spent 2µs making 1 call to Scalar::Util::weaken
47
4812µs12.24ms $self->_initialize_body;
49
5015µs return $self;
51}
52
53## method
54
55
# spent 2.24ms (12µs+2.23) within Moose::Meta::Method::Constructor::_initialize_body which was called: # once (12µs+2.23ms) by Moose::Meta::Method::Constructor::new at line 48
sub _initialize_body {
561300ns my $self = shift;
57111µs12.23ms $self->{'body'} = $self->_generate_constructor_method_inline;
58}
59
6014µs1;
61
62# ABSTRACT: Method Meta Object for constructors
63
64__END__