← Index
NYTProf Performance Profile   « line view »
For examples/Atom-timer.pl
  Run on Mon Aug 12 14:45:28 2013
Reported on Mon Aug 12 14:46:14 2013

Filename/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Meta/Method/Constructor.pm
StatementsExecuted 29 statements in 474µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111133µs15.1msMoose::Meta::Method::Constructor::::newMoose::Meta::Method::Constructor::new
11110µs14.9msMoose::Meta::Method::Constructor::::_initialize_bodyMoose::Meta::Method::Constructor::_initialize_body
1118µs8µsMoose::Meta::Method::Constructor::::BEGIN@3Moose::Meta::Method::Constructor::BEGIN@3
1117µs39µsMoose::Meta::Method::Constructor::::BEGIN@15Moose::Meta::Method::Constructor::BEGIN@15
1117µs32µsMoose::Meta::Method::Constructor::::BEGIN@16Moose::Meta::Method::Constructor::BEGIN@16
1116µs30µsMoose::Meta::Method::Constructor::::BEGIN@14Moose::Meta::Method::Constructor::BEGIN@14
1116µs9µsMoose::Meta::Method::Constructor::::BEGIN@11Moose::Meta::Method::Constructor::BEGIN@11
1116µs98µsMoose::Meta::Method::Constructor::::BEGIN@18Moose::Meta::Method::Constructor::BEGIN@18
1116µs16µsMoose::Meta::Method::Constructor::::BEGIN@10Moose::Meta::Method::Constructor::BEGIN@10
1112µs2µ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 8µs within Moose::Meta::Method::Constructor::BEGIN@3 which was called: # once (8µs+0s) by Moose::Meta::Class::BEGIN@25 at line 5
BEGIN {
417µs $Moose::Meta::Method::Constructor::AUTHORITY = 'cpan:STEVAN';
5127µs18µs}
# spent 8µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@3
6{
72800ns $Moose::Meta::Method::Constructor::VERSION = '2.1005';
8}
9
10222µs226µs
# spent 16µs (6+10) within Moose::Meta::Method::Constructor::BEGIN@10 which was called: # once (6µs+10µs) by Moose::Meta::Class::BEGIN@25 at line 10
use strict;
# spent 16µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@10 # spent 10µs making 1 call to strict::import
11218µs212µs
# spent 9µs (6+3) within Moose::Meta::Method::Constructor::BEGIN@11 which was called: # once (6µs+3µs) by Moose::Meta::Class::BEGIN@25 at line 11
use warnings;
# spent 9µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@11 # spent 3µs making 1 call to warnings::import
12
13218µs12µs
# spent 2µs within Moose::Meta::Method::Constructor::BEGIN@13 which was called: # once (2µs+0s) by Moose::Meta::Class::BEGIN@25 at line 13
use Carp ();
# spent 2µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@13
14227µs253µs
# spent 30µs (6+23) within Moose::Meta::Method::Constructor::BEGIN@14 which was called: # once (6µs+23µs) by Moose::Meta::Class::BEGIN@25 at line 14
use List::MoreUtils 'any';
# spent 30µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@14 # spent 23µs making 1 call to Exporter::import
15220µs271µs
# spent 39µs (7+32) within Moose::Meta::Method::Constructor::BEGIN@15 which was called: # once (7µs+32µs) by Moose::Meta::Class::BEGIN@25 at line 15
use Scalar::Util 'blessed', 'weaken', 'looks_like_number', 'refaddr';
# spent 39µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@15 # spent 32µs making 1 call to Exporter::import
16223µs257µs
# spent 32µs (7+25) within Moose::Meta::Method::Constructor::BEGIN@16 which was called: # once (7µs+25µs) by Moose::Meta::Class::BEGIN@25 at line 16
use Try::Tiny;
# spent 32µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@16 # spent 25µs making 1 call to Exporter::import
17
181200ns
# spent 98µs (6+92) within Moose::Meta::Method::Constructor::BEGIN@18 which was called: # once (6µs+92µs) by Moose::Meta::Class::BEGIN@25 at line 19
use base 'Moose::Meta::Method',
191166µs2189µs 'Class::MOP::Method::Constructor';
# spent 98µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@18 # spent 92µs making 1 call to base::import
20
21
# spent 15.1ms (133µs+14.9) within Moose::Meta::Method::Constructor::new which was called: # once (133µs+14.9ms) by Class::MOP::Class::_inline_constructor at line 1438 of Class/MOP/Class.pm
sub new {
221400ns my $class = shift;
2312µs my %options = @_;
24
251400ns my $meta = $options{metaclass};
26
271900ns (ref $options{options} eq 'HASH')
28 || $class->throw_error("You must pass a hash of options", data => $options{options});
29
301600ns ($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
3314µ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
461120µs1800ns weaken($self->{'associated_metaclass'});
# spent 800ns making 1 call to Scalar::Util::weaken
47
4812µs114.9ms $self->_initialize_body;
49
5014µs return $self;
51}
52
53## method
54
55
# spent 14.9ms (10µs+14.9) within Moose::Meta::Method::Constructor::_initialize_body which was called: # once (10µs+14.9ms) by Moose::Meta::Method::Constructor::new at line 48
sub _initialize_body {
561400ns my $self = shift;
5719µs114.9ms $self->{'body'} = $self->_generate_constructor_method_inline;
58}
59
6012µs1;
61
62# ABSTRACT: Method Meta Object for constructors
63
64__END__