← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/pan_genome_post_analysis
  Run on Fri Mar 27 11:43:32 2015
Reported on Fri Mar 27 11:45:41 2015

Filename/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Meta/Attribute/Native.pm
StatementsExecuted 38 statements in 305µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11114µs26µsMoose::::BEGIN@1 Moose::BEGIN@1
11110µs27µsMoose::Meta::Attribute::Native::::BEGIN@6Moose::Meta::Attribute::Native::BEGIN@6
1117µs11µsMoose::::BEGIN@2 Moose::BEGIN@2
0000s0sMoose::Meta::Attribute::Native::::__ANON__[:26]Moose::Meta::Attribute::Native::__ANON__[:26]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1222µs238µs
# spent 26µs (14+12) within Moose::BEGIN@1 which was called: # once (14µs+12µs) by Moose::BEGIN@43 at line 1
use strict;
# spent 26µs making 1 call to Moose::BEGIN@1 # spent 12µs making 1 call to strict::import
2247µs215µs
# spent 11µs (7+4) within Moose::BEGIN@2 which was called: # once (7µs+4µs) by Moose::BEGIN@43 at line 2
use warnings;
# spent 11µs making 1 call to Moose::BEGIN@2 # spent 4µs making 1 call to warnings::import
3package Moose::Meta::Attribute::Native;
41600nsour $VERSION = '2.1403';
5
62150µs244µs
# spent 27µs (10+17) within Moose::Meta::Attribute::Native::BEGIN@6 which was called: # once (10µs+17µs) by Moose::BEGIN@43 at line 6
use Module::Runtime 'require_module';
# spent 27µs making 1 call to Moose::Meta::Attribute::Native::BEGIN@6 # spent 17µs making 1 call to Module::Runtime::import
7
812µsmy @trait_names = qw(Bool Counter Number String Array Hash Code);
9
101500nsfor my $trait_name (@trait_names) {
112860µs my $trait_class = "Moose::Meta::Attribute::Native::Trait::$trait_name";
127569µs my $meta = Class::MOP::Class->initialize(
# spent 569µs making 7 calls to Class::MOP::Class::initialize, avg 81µs/call
13 "Moose::Meta::Attribute::Custom::Trait::$trait_name"
14 );
15
167587µs if ($meta->find_method_by_name('register_implementation')) {
# spent 587µs making 7 calls to Class::MOP::Class::find_method_by_name, avg 84µs/call
17 my $class = $meta->name->register_implementation;
18 die "An implementation for $trait_name already exists " .
19 "(found '$class' when trying to register '$trait_class')"
20 }
21 $meta->add_method(register_implementation => sub {
22 # resolve_metatrait_alias will load classes anyway, but throws away
23 # their error message; we WANT to die if there's a problem
24 require_module($trait_class);
25 return $trait_class;
267383µs });
# spent 383µs making 7 calls to Class::MOP::Mixin::HasMethods::add_method, avg 55µs/call
27}
28
29123µs1;
30
31# ABSTRACT: Delegate to native Perl types
32
33__END__