← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:45:08 2010
Reported on Wed Nov 17 22:11:36 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm
StatementsExecuted 373 statements in 5.87ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11155µs55µsMooseX::StrictConstructor::Role::Meta::Method::Constructor::::BEGIN@2MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@2
11147µs727µsMooseX::StrictConstructor::Role::Meta::Method::Constructor::::BEGIN@41MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@41
11142µs14.6msMooseX::StrictConstructor::Role::Meta::Method::Constructor::::BEGIN@12MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@12
11140µs59µsMooseX::StrictConstructor::Role::Meta::Method::Constructor::::BEGIN@6MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@6
11138µs107µsMooseX::StrictConstructor::Role::Meta::Method::Constructor::::BEGIN@7MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@7
11120µs20µsMooseX::StrictConstructor::Role::Meta::Method::Constructor::::BEGIN@10MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@10
11119µs19µsMooseX::StrictConstructor::Role::Meta::Method::Constructor::::BEGIN@9MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@9
0000s0sMooseX::StrictConstructor::Role::Meta::Method::Constructor::::__ANON__[:39]MooseX::StrictConstructor::Role::Meta::Method::Constructor::__ANON__[:39]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package MooseX::StrictConstructor::Role::Meta::Method::Constructor;
2
# spent 55µs within MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@2 which was called: # once (55µs+0s) by MooseX::StrictConstructor::BEGIN@13 at line 4
BEGIN {
3129µs $MooseX::StrictConstructor::Role::Meta::Method::Constructor::VERSION = '0.11';
4194µs155µs}
5
6395µs278µs
# spent 59µs (40+19) within MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@6 which was called: # once (40µs+19µs) by MooseX::StrictConstructor::BEGIN@13 at line 6
use strict;
# spent 59µs making 1 call to MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@6 # spent 19µs making 1 call to strict::import
7392µs2176µs
# spent 107µs (38+69) within MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@7 which was called: # once (38µs+69µs) by MooseX::StrictConstructor::BEGIN@13 at line 7
use warnings;
# spent 107µs making 1 call to MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@7 # spent 69µs making 1 call to warnings::import
8
9378µs119µs
# spent 19µs within MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@9 which was called: # once (19µs+0s) by MooseX::StrictConstructor::BEGIN@13 at line 9
use B ();
103114µs120µs
# spent 20µs within MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@10 which was called: # once (20µs+0s) by MooseX::StrictConstructor::BEGIN@13 at line 10
use Carp ();
11
123620µs229.2ms
# spent 14.6ms (42µs+14.6) within MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@12 which was called: # once (42µs+14.6ms) by MooseX::StrictConstructor::BEGIN@13 at line 12
use Moose::Role;
13
14around '_generate_BUILDALL' => sub {
152592.91ms my $orig = shift;
16 my $self = shift;
17
183740.5ms my $source = $self->$orig();
# spent 40.5ms making 37 calls to Moose::Meta::Method::Constructor::_generate_BUILDALL, avg 1.09ms/call
19 $source .= ";\n" if $source;
20
2141426µs my @attrs = (
# spent 426µs making 41 calls to B::perlstring, avg 10µs/call
22 "__INSTANCE__ => 1,",
23 map { B::perlstring($_) . ' => 1,' }
2452556µs grep {defined}
# spent 556µs making 52 calls to Class::MOP::Mixin::AttributeCore::init_arg, avg 11µs/call
25931.64ms37519µs map { $_->init_arg() } @{ $self->_attributes() }
# spent 519µs making 37 calls to Class::MOP::Method::Constructor::_attributes, avg 14µs/call
26 );
27
28 $source .= <<"EOF";
29my \%attrs = (@attrs);
30
31my \@bad = sort grep { ! \$attrs{\$_} } keys \%{ \$params };
32
33if (\@bad) {
34 Carp::confess "Found unknown attribute(s) passed to the constructor: \@bad";
35}
36EOF
37
38 return $source;
39122µs1355µs};
# spent 355µs making 1 call to Moose::Role::around
40
413143µs21.41ms
# spent 727µs (47+680) within MooseX::StrictConstructor::Role::Meta::Method::Constructor::BEGIN@41 which was called: # once (47µs+680µs) by MooseX::StrictConstructor::BEGIN@13 at line 41
no Moose::Role;
42
43127µs1;
44
45# ABSTRACT: A role to make immutable constructors strict
46
- -
49=pod
50
- -
90__END__