← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 10:04:38 2014
Reported on Tue Jun 24 10:05:07 2014

Filename/usr/local/lib/perl/5.14.2/Moose/Meta/Attribute/Native.pm
StatementsExecuted 36 statements in 261µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11110µs10µsMoose::Meta::Attribute::Native::::BEGIN@2Moose::Meta::Attribute::Native::BEGIN@2
1117µs34µsMoose::Meta::Attribute::Native::::BEGIN@9Moose::Meta::Attribute::Native::BEGIN@9
0000s0sMoose::Meta::Attribute::Native::::__ANON__[:30]Moose::Meta::Attribute::Native::__ANON__[:30]
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::Attribute::Native;
2
# spent 10µs within Moose::Meta::Attribute::Native::BEGIN@2 which was called: # once (10µs+0s) by Moose::BEGIN@46 at line 4
BEGIN {
315µs $Moose::Meta::Attribute::Native::AUTHORITY = 'cpan:STEVAN';
4132µs110µs}
# spent 10µs making 1 call to Moose::Meta::Attribute::Native::BEGIN@2
5{
621µs $Moose::Meta::Attribute::Native::VERSION = '2.1005';
7}
8
92155µs260µs
# spent 34µs (7+26) within Moose::Meta::Attribute::Native::BEGIN@9 which was called: # once (7µs+26µs) by Moose::BEGIN@46 at line 9
use Class::Load qw(load_class);
# spent 34µs making 1 call to Moose::Meta::Attribute::Native::BEGIN@9 # spent 26µs making 1 call to Exporter::import
10
1112µsmy @trait_names = qw(Bool Counter Number String Array Hash Code);
12
131800nsfor my $trait_name (@trait_names) {
1474µs my $trait_class = "Moose::Meta::Attribute::Native::Trait::$trait_name";
15711µs7469µs my $meta = Class::MOP::Class->initialize(
# spent 469µs making 7 calls to Class::MOP::Class::initialize, avg 67µs/call
16 "Moose::Meta::Attribute::Custom::Trait::$trait_name"
17 );
1878µs7480µs if ($meta->find_method_by_name('register_implementation')) {
# spent 480µs making 7 calls to Class::MOP::Class::find_method_by_name, avg 69µs/call
19 my $class = $meta->name->register_implementation;
20 Moose->throw_error(
21 "An implementation for $trait_name already exists " .
22 "(found '$class' when trying to register '$trait_class')"
23 );
24 }
25 $meta->add_method(register_implementation => sub {
26 # resolve_metatrait_alias will load classes anyway, but throws away
27 # their error message; we WANT to die if there's a problem
28 load_class($trait_class);
29 return $trait_class;
30732µs7337µs });
# spent 337µs making 7 calls to Class::MOP::Mixin::HasMethods::add_method, avg 48µs/call
31}
32
33110µs1;
34
35# ABSTRACT: Delegate to native Perl types
36
37__END__