← Index
NYTProf Performance Profile   « line view »
For script/ponapi
  Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:10 2016

Filename/usr/local/lib/perl/5.18.2/Moose.pm
StatementsExecuted 1165 statements in 10.2ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
9448176.20ms756msMoose::::has Moose::has
1113.60ms15.8msMoose::::BEGIN@24 Moose::BEGIN@24
1113.01ms80.0msMoose::::BEGIN@15 Moose::BEGIN@15
1112.76ms18.5msMoose::::BEGIN@32 Moose::BEGIN@32
1111.72ms10.4msMoose::::BEGIN@25 Moose::BEGIN@25
1111.62ms2.67msMoose::::BEGIN@35 Moose::BEGIN@35
28111.20ms74.3msMoose::::init_meta Moose::init_meta
111937µs2.95msMoose::::BEGIN@33 Moose::BEGIN@33
111929µs2.23msMoose::::BEGIN@36 Moose::BEGIN@36
111808µs2.78msMoose::::BEGIN@30 Moose::BEGIN@30
111713µs5.38msMoose::::BEGIN@34 Moose::BEGIN@34
111697µs1.27msMoose::::BEGIN@37 Moose::BEGIN@37
111639µs105msMoose::::BEGIN@26 Moose::BEGIN@26
111398µs1.31msMoose::::BEGIN@38 Moose::BEGIN@38
281515317µs1.18sMoose::::extends Moose::extends
111304µs1.38msMoose::::BEGIN@43 Moose::BEGIN@43
361919230µs1.10sMoose::::with Moose::with (recurses: max depth 1, inclusive time 7.62ms)
111162µs162µsMoose::::bootstrap Moose::bootstrap (xsub)
111161µs1.30msMoose::::BEGIN@28 Moose::BEGIN@28
111147µs2.04msMoose::::BEGIN@14 Moose::BEGIN@14
22225µs617µsMoose::::override Moose::override
1119µs9µsMoose::::BEGIN@7 Moose::BEGIN@7
1119µs1.14msMoose::::BEGIN@40 Moose::BEGIN@40
1118µs19µsPONAPI::Server::ConfigReader::::BEGIN@1PONAPI::Server::ConfigReader::BEGIN@1
1118µs38µsMoose::::BEGIN@12 Moose::BEGIN@12
1117µs20µsMoose::::BEGIN@11 Moose::BEGIN@11
1116µs118µsMoose::::BEGIN@41 Moose::BEGIN@41
1116µs9µsPONAPI::Server::ConfigReader::::BEGIN@2PONAPI::Server::ConfigReader::BEGIN@2
1116µs29µsMoose::::BEGIN@10 Moose::BEGIN@10
1115µs5µsMoose::::BEGIN@17 Moose::BEGIN@17
1114µs4µsMoose::::BEGIN@27 Moose::BEGIN@27
1113µs3µsMoose::::BEGIN@9 Moose::BEGIN@9
1112µs2µsMoose::::BEGIN@19 Moose::BEGIN@19
0000s0sMoose::::_get_caller Moose::_get_caller
0000s0sMoose::::after Moose::after
0000s0sMoose::::around Moose::around
0000s0sMoose::::augment Moose::augment
0000s0sMoose::::before Moose::before
0000s0sMoose::::inner Moose::inner
0000s0sMoose::::super Moose::super
0000s0sMoose::::throw_error Moose::throw_error
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1230µs229µs
# spent 19µs (8+10) within PONAPI::Server::ConfigReader::BEGIN@1 which was called: # once (8µs+10µs) by PONAPI::Server::ConfigReader::BEGIN@4 at line 1
use strict;
# spent 19µs making 1 call to PONAPI::Server::ConfigReader::BEGIN@1 # spent 10µs making 1 call to strict::import
2240µs213µs
# spent 9µs (6+3) within PONAPI::Server::ConfigReader::BEGIN@2 which was called: # once (6µs+3µs) by PONAPI::Server::ConfigReader::BEGIN@4 at line 2
use warnings;
# spent 9µs making 1 call to PONAPI::Server::ConfigReader::BEGIN@2 # spent 3µs making 1 call to warnings::import
3package Moose; # git description: 2.1603-10-g5280cac
41900nsour $VERSION = '2.1604';
51300nsour $AUTHORITY = 'cpan:STEVAN';
6
7238µs19µs
# spent 9µs within Moose::BEGIN@7 which was called: # once (9µs+0s) by PONAPI::Server::ConfigReader::BEGIN@4 at line 7
use 5.008003;
# spent 9µs making 1 call to Moose::BEGIN@7
8
9218µs13µs
# spent 3µs within Moose::BEGIN@9 which was called: # once (3µs+0s) by PONAPI::Server::ConfigReader::BEGIN@4 at line 9
use Scalar::Util ();
# spent 3µs making 1 call to Moose::BEGIN@9
10224µs252µs
# spent 29µs (6+23) within Moose::BEGIN@10 which was called: # once (6µs+23µs) by PONAPI::Server::ConfigReader::BEGIN@4 at line 10
use Carp 'carp';
# spent 29µs making 1 call to Moose::BEGIN@10 # spent 23µs making 1 call to Exporter::import
11220µs232µs
# spent 20µs (7+13) within Moose::BEGIN@11 which was called: # once (7µs+13µs) by PONAPI::Server::ConfigReader::BEGIN@4 at line 11
use Module::Runtime 'module_notional_filename';
# spent 20µs making 1 call to Moose::BEGIN@11 # spent 13µs making 1 call to Module::Runtime::import
12222µs269µs
# spent 38µs (8+30) within Moose::BEGIN@12 which was called: # once (8µs+30µs) by PONAPI::Server::ConfigReader::BEGIN@4 at line 12
use Class::Load 'is_class_loaded';
# spent 38µs making 1 call to Moose::BEGIN@12 # spent 30µs making 1 call to Exporter::import
13
14282µs22.04ms
# spent 2.04ms (147µs+1.89) within Moose::BEGIN@14 which was called: # once (147µs+1.89ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 14
use Moose::Deprecated;
# spent 2.04ms making 1 call to Moose::BEGIN@14 # spent 5µs making 1 call to Package::DeprecationManager::__ANON__[Package/DeprecationManager.pm:61]
152115µs280.0ms
# spent 80.0ms (3.01+77.0) within Moose::BEGIN@15 which was called: # once (3.01ms+77.0ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 15
use Moose::Exporter;
# spent 80.0ms making 1 call to Moose::BEGIN@15 # spent 49µs making 1 call to Moose::Exporter::import
16
17237µs15µs
# spent 5µs within Moose::BEGIN@17 which was called: # once (5µs+0s) by PONAPI::Server::ConfigReader::BEGIN@4 at line 17
use Class::MOP;
# spent 5µs making 1 call to Moose::BEGIN@17
18
19
# spent 2µs within Moose::BEGIN@19 which was called: # once (2µs+0s) by PONAPI::Server::ConfigReader::BEGIN@4 at line 22
BEGIN {
2013µs die "Class::MOP version $Moose::VERSION required--this is version $Class::MOP::VERSION"
21 if $Moose::VERSION && $Class::MOP::VERSION ne $Moose::VERSION;
22115µs12µs}
# spent 2µs making 1 call to Moose::BEGIN@19
23
242115µs115.8ms
# spent 15.8ms (3.60+12.2) within Moose::BEGIN@24 which was called: # once (3.60ms+12.2ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 24
use Moose::Meta::Class;
# spent 15.8ms making 1 call to Moose::BEGIN@24
252138µs110.4ms
# spent 10.4ms (1.72+8.72) within Moose::BEGIN@25 which was called: # once (1.72ms+8.72ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 25
use Moose::Meta::TypeConstraint;
# spent 10.4ms making 1 call to Moose::BEGIN@25
262122µs1105ms
# spent 105ms (639µs+104) within Moose::BEGIN@26 which was called: # once (639µs+104ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 26
use Moose::Meta::TypeCoercion;
# spent 105ms making 1 call to Moose::BEGIN@26
27218µs14µs
# spent 4µs within Moose::BEGIN@27 which was called: # once (4µs+0s) by PONAPI::Server::ConfigReader::BEGIN@4 at line 27
use Moose::Meta::Attribute;
# spent 4µs making 1 call to Moose::BEGIN@27
282108µs11.30ms
# spent 1.30ms (161µs+1.14) within Moose::BEGIN@28 which was called: # once (161µs+1.14ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 28
use Moose::Meta::Instance;
# spent 1.30ms making 1 call to Moose::BEGIN@28
29
302113µs12.78ms
# spent 2.78ms (808µs+1.97) within Moose::BEGIN@30 which was called: # once (808µs+1.97ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 30
use Moose::Object;
# spent 2.78ms making 1 call to Moose::BEGIN@30
31
322122µs118.5ms
# spent 18.5ms (2.76+15.7) within Moose::BEGIN@32 which was called: # once (2.76ms+15.7ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 32
use Moose::Meta::Role;
# spent 18.5ms making 1 call to Moose::BEGIN@32
332128µs12.95ms
# spent 2.95ms (937µs+2.01) within Moose::BEGIN@33 which was called: # once (937µs+2.01ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 33
use Moose::Meta::Role::Composite;
# spent 2.95ms making 1 call to Moose::BEGIN@33
342101µs15.38ms
# spent 5.38ms (713µs+4.66) within Moose::BEGIN@34 which was called: # once (713µs+4.66ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 34
use Moose::Meta::Role::Application;
# spent 5.38ms making 1 call to Moose::BEGIN@34
352117µs12.67ms
# spent 2.67ms (1.62+1.05) within Moose::BEGIN@35 which was called: # once (1.62ms+1.05ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 35
use Moose::Meta::Role::Application::RoleSummation;
# spent 2.67ms making 1 call to Moose::BEGIN@35
362118µs12.23ms
# spent 2.23ms (929µs+1.30) within Moose::BEGIN@36 which was called: # once (929µs+1.30ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 36
use Moose::Meta::Role::Application::ToClass;
# spent 2.23ms making 1 call to Moose::BEGIN@36
372102µs11.27ms
# spent 1.27ms (697µs+571µs) within Moose::BEGIN@37 which was called: # once (697µs+571µs) by PONAPI::Server::ConfigReader::BEGIN@4 at line 37
use Moose::Meta::Role::Application::ToRole;
# spent 1.27ms making 1 call to Moose::BEGIN@37
38292µs11.31ms
# spent 1.31ms (398µs+912µs) within Moose::BEGIN@38 which was called: # once (398µs+912µs) by PONAPI::Server::ConfigReader::BEGIN@4 at line 38
use Moose::Meta::Role::Application::ToInstance;
# spent 1.31ms making 1 call to Moose::BEGIN@38
39
40229µs22.28ms
# spent 1.14ms (9µs+1.13) within Moose::BEGIN@40 which was called: # once (9µs+1.13ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 40
use Moose::Util::TypeConstraints;
# spent 1.14ms making 1 call to Moose::BEGIN@40 # spent 1.13ms making 1 call to Moose::Util::TypeConstraints::import
41230µs2230µs
# spent 118µs (6+112) within Moose::BEGIN@41 which was called: # once (6µs+112µs) by PONAPI::Server::ConfigReader::BEGIN@4 at line 41
use Moose::Util 'throw_exception';
# spent 118µs making 1 call to Moose::BEGIN@41 # spent 112µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337]
42
432869µs11.38ms
# spent 1.38ms (304µs+1.07) within Moose::BEGIN@43 which was called: # once (304µs+1.07ms) by PONAPI::Server::ConfigReader::BEGIN@4 at line 43
use Moose::Meta::Attribute::Native;
# spent 1.38ms making 1 call to Moose::BEGIN@43
44
45
# spent 1.18s (317µs+1.18) within Moose::extends which was called 28 times, avg 42.2ms/call: # 14 times (101µs+591ms) by Moose::extends at line 419 of Moose/Exporter.pm, avg 42.2ms/call # once (13µs+562ms) by PONAPI::DAO::BEGIN@6 at line 6 of lib/PONAPI/DAO/Request/Retrieve.pm # once (7µs+21.9ms) by Test::PONAPI::Repository::MockDB::Table::Articles::BEGIN@5 at line 6 of lib/Test/PONAPI/Repository/MockDB/Table/Relationships.pm # once (25µs+645µs) by Test::PONAPI::Repository::MockDB::BEGIN@12 at line 7 of lib/Test/PONAPI/Repository/MockDB/Table/Articles.pm # once (14µs+632µs) by PONAPI::DAO::BEGIN@11 at line 6 of lib/PONAPI/DAO/Request/CreateRelationships.pm # once (18µs+610µs) by PONAPI::DAO::BEGIN@14 at line 6 of lib/PONAPI/DAO/Request/Delete.pm # once (26µs+602µs) by PONAPI::DAO::BEGIN@15 at line 6 of lib/PONAPI/DAO/Request/DeleteRelationships.pm # once (15µs+611µs) by PONAPI::DAO::BEGIN@9 at line 6 of lib/PONAPI/DAO/Request/RetrieveByRelationship.pm # once (19µs+602µs) by PONAPI::DAO::BEGIN@13 at line 6 of lib/PONAPI/DAO/Request/UpdateRelationships.pm # once (8µs+602µs) by Test::PONAPI::Repository::MockDB::BEGIN@13 at line 6 of lib/Test/PONAPI/Repository/MockDB/Table/People.pm # once (22µs+585µs) by PONAPI::DAO::BEGIN@7 at line 6 of lib/PONAPI/DAO/Request/RetrieveAll.pm # once (16µs+582µs) by PONAPI::DAO::BEGIN@8 at line 6 of lib/PONAPI/DAO/Request/RetrieveRelationships.pm # once (15µs+573µs) by PONAPI::DAO::BEGIN@10 at line 6 of lib/PONAPI/DAO/Request/Create.pm # once (7µs+567µs) by Test::PONAPI::Repository::MockDB::BEGIN@14 at line 5 of lib/Test/PONAPI/Repository/MockDB/Table/Comments.pm # once (12µs+555µs) by PONAPI::DAO::BEGIN@12 at line 6 of lib/PONAPI/DAO/Request/Update.pm
sub extends {
461417µs my $meta = shift;
47
48147µs unless ( @_ )
49 {
50 throw_exception( ExtendsMissingArgs => class_name => $meta->name );
51 }
52 # this checks the metaclass to make sure
53 # it is correct, sometimes it can get out
54 # of sync when the classes are being built
551464µs14591ms $meta->superclasses(@_);
# spent 591ms making 14 calls to Moose::Meta::Class::superclasses, avg 42.2ms/call
56}
57
58
# spent 1.10s (230µs+1.10) within Moose::with which was called 36 times, avg 30.6ms/call: # 18 times (83µs+547ms) by Moose::with at line 419 of Moose/Exporter.pm, avg 30.4ms/call # once (8µs+141ms) by PONAPI::Builder::Resource::BEGIN@6 at line 8 of lib/PONAPI/Builder/Relationship.pm # once (8µs+77.2ms) by PONAPI::Builder::Relationship::BEGIN@6 at line 6 of lib/PONAPI/Builder/Resource/Identifier.pm # once (7µs+58.4ms) by PONAPI::DAO::BEGIN@6 at line 8 of lib/PONAPI/DAO/Request/Retrieve.pm # once (6µs+49.6ms) by PONAPI::DAO::BEGIN@11 at line 8 of lib/PONAPI/DAO/Request/CreateRelationships.pm # once (7µs+34.9ms) by PONAPI::DAO::BEGIN@9 at line 8 of lib/PONAPI/DAO/Request/RetrieveByRelationship.pm # once (7µs+29.3ms) by PONAPI::DAO::BEGIN@7 at line 8 of lib/PONAPI/DAO/Request/RetrieveAll.pm # once (7µs+28.5ms) by PONAPI::DAO::BEGIN@8 at line 8 of lib/PONAPI/DAO/Request/RetrieveRelationships.pm # once (9µs+24.7ms) by PONAPI::DAO::Request::BEGIN@7 at line 10 of lib/PONAPI/Builder/Document.pm # once (6µs+22.2ms) by PONAPI::DAO::BEGIN@15 at line 8 of lib/PONAPI/DAO/Request/DeleteRelationships.pm # once (6µs+20.8ms) by PONAPI::DAO::BEGIN@12 at line 8 of lib/PONAPI/DAO/Request/Update.pm # once (6µs+16.6ms) by PONAPI::DAO::BEGIN@10 at line 8 of lib/PONAPI/DAO/Request/Create.pm # once (7µs+14.9ms) by PONAPI::DAO::BEGIN@13 at line 8 of lib/PONAPI/DAO/Request/UpdateRelationships.pm # once (15µs+11.3ms) by PONAPI::Builder::Document::BEGIN@6 at line 8 of lib/PONAPI/Builder/Resource.pm # once (12µs+7.69ms) by PONAPI::Builder::Document::BEGIN@8 at line 6 of lib/PONAPI/Builder/Errors.pm # once (15µs+7.63ms) by PONAPI::Builder::Role::HasLinksBuilder::BEGIN@6 at line 6 of lib/PONAPI/Builder/Links.pm # once (10µs+4.34ms) by Module::Runtime::require_module at line 19 of lib/Test/PONAPI/Repository/MockDB.pm # once (8µs+3.37ms) by PONAPI::Builder::Document::BEGIN@7 at line 6 of lib/PONAPI/Builder/Resource/Null.pm # once (6µs+2.98ms) by PONAPI::DAO::BEGIN@14 at line 8 of lib/PONAPI/DAO/Request/Delete.pm
sub with {
591881µs18547ms Moose::Util::apply_all_roles(shift, @_);
# spent 555ms making 18 calls to Moose::Util::apply_all_roles, avg 30.8ms/call, recursion: max depth 1, sum of overlapping time 7.61ms
60}
61
62sub throw_error {
63 shift;
64 Class::MOP::Object->throw_error(@_);
65}
66
67
# spent 756ms (6.20+750) within Moose::has which was called 94 times, avg 8.05ms/call: # 47 times (839µs+374ms) by Moose::has at line 419 of Moose/Exporter.pm, avg 7.99ms/call # once (11µs+107ms) by PONAPI::Builder::Resource::BEGIN@6 at line 25 of lib/PONAPI/Builder/Relationship.pm # once (8µs+103ms) by PONAPI::Builder::Role::HasLinksBuilder::BEGIN@6 at line 16 of lib/PONAPI/Builder/Links.pm # once (9µs+21.1ms) by PONAPI::Builder::Document::BEGIN@6 at line 39 of lib/PONAPI/Builder/Resource.pm # once (8µs+15.7ms) by PONAPI::DAO::Request::BEGIN@7 at line 71 of lib/PONAPI/Builder/Document.pm # once (6µs+13.3ms) by PONAPI::Builder::Document::BEGIN@6 at line 22 of lib/PONAPI/Builder/Resource.pm # once (5.02ms+6.49ms) by PONAPI::Builder::Document::BEGIN@8 at line 15 of lib/PONAPI/Builder/Errors.pm # once (13µs+9.39ms) by Module::Runtime::require_module at line 8 of lib/Test/PONAPI/Repository/MockDB/Table.pm # once (8µs+7.33ms) by Module::Runtime::require_module at line 37 of lib/PONAPI/DAO/Request.pm # once (6µs+6.78ms) by PONAPI::DAO::Request::Role::UpdateLike::BEGIN@7 at line 28 of lib/PONAPI/Exception.pm # once (9µs+6.56ms) by Test::PONAPI::Repository::MockDB::BEGIN@10 at line 8 of lib/Test/PONAPI/Repository/MockDB/Loader.pm # once (6µs+6.47ms) by PONAPI::DAO::Request::BEGIN@7 at line 57 of lib/PONAPI/Builder/Document.pm # once (9µs+5.71ms) by Module::Runtime::require_module at line 38 of lib/Test/PONAPI/Repository/MockDB.pm # once (9µs+5.42ms) by PONAPI::Builder::Relationship::BEGIN@6 at line 9 of lib/PONAPI/Builder/Resource/Identifier.pm # once (8µs+3.89ms) by PONAPI::DAO::BEGIN@13 at line 13 of lib/PONAPI/DAO/Request/UpdateRelationships.pm # once (6µs+3.33ms) by PONAPI::DAO::Request::BEGIN@7 at line 26 of lib/PONAPI/Builder/Document.pm # once (8µs+2.81ms) by PONAPI::DAO::BEGIN@12 at line 16 of lib/PONAPI/DAO/Request/Update.pm # once (8µs+2.54ms) by PONAPI::DAO::Request::BEGIN@7 at line 80 of lib/PONAPI/Builder/Document.pm # once (7µs+2.51ms) by Module::Runtime::require_module at line 21 of lib/Test/PONAPI/Repository/MockDB.pm # once (15µs+2.48ms) by PONAPI::Builder::Resource::BEGIN@6 at line 34 of lib/PONAPI/Builder/Relationship.pm # once (6µs+2.44ms) by Module::Runtime::require_module at line 24 of lib/Test/PONAPI/Repository/MockDB/Table.pm # once (8µs+2.34ms) by Test::PONAPI::Repository::MockDB::BEGIN@10 at line 21 of lib/Test/PONAPI/Repository/MockDB/Loader.pm # once (5µs+2.23ms) by PONAPI::DAO::Request::BEGIN@7 at line 43 of lib/PONAPI/Builder/Document.pm # once (6µs+2.21ms) by PONAPI::DAO::Request::Role::UpdateLike::BEGIN@7 at line 49 of lib/PONAPI/Exception.pm # once (9µs+2.07ms) by Module::Runtime::require_module at line 9 of lib/PONAPI/DAO/Request.pm # once (8µs+2.04ms) by Module::Runtime::require_module at line 44 of lib/PONAPI/DAO/Request.pm # once (9µs+1.69ms) by PONAPI::DAO::Request::BEGIN@7 at line 15 of lib/PONAPI/Builder/Document.pm # once (9µs+1.65ms) by PONAPI::DAO::Request::Role::UpdateLike::BEGIN@7 at line 18 of lib/PONAPI/Exception.pm # once (9µs+1.65ms) by Module::Runtime::require_module at line 31 of lib/PONAPI/DAO/Request.pm # once (6µs+1.64ms) by PONAPI::Server::BEGIN@17 at line 24 of lib/PONAPI/Server/ConfigReader.pm # once (7µs+1.55ms) by Test::PONAPI::Repository::MockDB::Table::Articles::BEGIN@5 at line 8 of lib/Test/PONAPI/Repository/MockDB/Table/Relationships.pm # once (6µs+1.55ms) by PONAPI::Server::BEGIN@17 at line 17 of lib/PONAPI/Server/ConfigReader.pm # once (8µs+1.53ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 17 of lib/PONAPI/DAO.pm # once (7µs+1.42ms) by Module::Runtime::require_module at line 21 of lib/PONAPI/DAO/Request.pm # once (7µs+1.40ms) by PONAPI::Builder::Resource::BEGIN@6 at line 12 of lib/PONAPI/Builder/Relationship.pm # once (8µs+1.37ms) by PONAPI::Builder::Document::BEGIN@6 at line 12 of lib/PONAPI/Builder/Resource.pm # once (6µs+1.37ms) by PONAPI::DAO::Request::Role::UpdateLike::BEGIN@7 at line 30 of lib/PONAPI/Exception.pm # once (5µs+1.33ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 33 of lib/PONAPI/DAO.pm # once (5µs+1.30ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 23 of lib/PONAPI/DAO.pm # once (5µs+1.30ms) by PONAPI::DAO::Request::BEGIN@7 at line 35 of lib/PONAPI/Builder/Document.pm # once (6µs+1.29ms) by Test::PONAPI::Repository::MockDB::Table::Articles::BEGIN@5 at line 14 of lib/Test/PONAPI/Repository/MockDB/Table/Relationships.pm # once (5µs+1.25ms) by PONAPI::Builder::Relationship::BEGIN@6 at line 10 of lib/PONAPI/Builder/Resource/Identifier.pm # once (5µs+1.24ms) by PONAPI::DAO::Request::Role::UpdateLike::BEGIN@7 at line 35 of lib/PONAPI/Exception.pm # once (6µs+1.24ms) by PONAPI::DAO::Request::BEGIN@7 at line 41 of lib/PONAPI/Builder/Document.pm # once (6µs+1.23ms) by Module::Runtime::require_module at line 14 of lib/Test/PONAPI/Repository/MockDB/Table.pm # once (5µs+1.23ms) by PONAPI::DAO::Request::Role::UpdateLike::BEGIN@7 at line 40 of lib/PONAPI/Exception.pm # once (6µs+1.21ms) by Module::Runtime::require_module at line 15 of lib/PONAPI/DAO/Request.pm # once (6µs+1.20ms) by PONAPI::Builder::Document::BEGIN@6 at line 13 of lib/PONAPI/Builder/Resource.pm
sub has {
684718µs my $meta = shift;
694717µs my $name = shift;
70
7147139µs47402µs my %context = Moose::Util::_caller_info;
# spent 402µs making 47 calls to Moose::Util::_caller_info, avg 9µs/call
724740µs $context{context} = 'has declaration';
734725µs $context{type} = 'class';
7447112µs my @options = ( definition_context => \%context, @_ );
754754µs my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ];
76475.34ms49374ms $meta->add_attribute( $_, @options ) for @$attrs;
# spent 374ms making 49 calls to Moose::Meta::Class::add_attribute, avg 7.63ms/call
77}
78
79sub before {
80 Moose::Util::add_method_modifier(shift, 'before', \@_);
81}
82
83sub after {
84 Moose::Util::add_method_modifier(shift, 'after', \@_);
85}
86
87sub around {
88 Moose::Util::add_method_modifier(shift, 'around', \@_);
89}
90
911100nsour $SUPER_PACKAGE;
9210sour $SUPER_BODY;
931300nsour @SUPER_ARGS;
94
95sub super {
96 if (@_) {
97 carp 'Arguments passed to super() are ignored';
98 }
99
100 # This check avoids a recursion loop - see
101 # t/bugs/super_recursion.t
102 return if defined $SUPER_PACKAGE && $SUPER_PACKAGE ne caller();
103 return unless $SUPER_BODY; $SUPER_BODY->(@SUPER_ARGS);
104}
105
106
# spent 617µs (25+592) within Moose::override which was called 2 times, avg 308µs/call: # once (19µs+301µs) by Test::PONAPI::Repository::MockDB::BEGIN@12 at line 68 of lib/Test/PONAPI/Repository/MockDB/Table/Articles.pm # once (6µs+291µs) by Moose::override at line 419 of Moose/Exporter.pm
sub override {
1071400ns my $meta = shift;
1081400ns my ( $name, $method ) = @_;
109116µs1291µs $meta->add_override_method_modifier( $name => $method );
# spent 291µs making 1 call to Moose::Meta::Class::add_override_method_modifier
110}
111
112sub inner {
113 my $pkg = caller();
114 our ( %INNER_BODY, %INNER_ARGS );
115
116 if ( my $body = $INNER_BODY{$pkg} ) {
117 my @args = @{ $INNER_ARGS{$pkg} };
118 local $INNER_ARGS{$pkg};
119 local $INNER_BODY{$pkg};
120 return $body->(@args);
121 } else {
122 return;
123 }
124}
125
126sub augment {
127 my $meta = shift;
128 my ( $name, $method ) = @_;
129 $meta->add_augment_method_modifier( $name => $method );
130}
131
13216µs1769µsMoose::Exporter->setup_import_methods(
# spent 769µs making 1 call to Moose::Exporter::setup_import_methods
133 with_meta => [
134 qw( extends with has before after around override augment )
135 ],
136 as_is => [
137 qw( super inner ),
138 'Carp::confess',
139 'Scalar::Util::blessed',
140 ],
141);
142
143
# spent 74.3ms (1.20+73.1) within Moose::init_meta which was called 28 times, avg 2.65ms/call: # 28 times (1.20ms+73.1ms) by Moose::import at line 484 of Moose/Exporter.pm, avg 2.65ms/call
sub init_meta {
144285µs shift;
1452853µs my %args = @_;
146
1472821µs my $class = $args{for_class}
148 or throw_exception( InitMetaRequiresClass => params => \%args );
149
1502819µs my $base_class = $args{base_class} || 'Moose::Object';
1512812µs my $metaclass = $args{metaclass} || 'Moose::Meta::Class';
1522821µs my $meta_name = exists $args{meta_name} ? $args{meta_name} : 'meta';
153
15428184µs2899µs throw_exception( MetaclassNotLoaded => class_name => $metaclass )
# spent 99µs making 28 calls to Class::Load::XS::is_class_loaded, avg 4µs/call
155 unless is_class_loaded($metaclass);
156
15728108µs2829µs throw_exception( MetaclassMustBeASubclassOfMooseMetaClass => class_name => $metaclass )
# spent 29µs making 28 calls to UNIVERSAL::isa, avg 1µs/call
158 unless $metaclass->isa('Moose::Meta::Class');
159
160 # make a subtype for each Moose class
16128101µs5623.0ms class_type($class)
# spent 22.5ms making 28 calls to Moose::Util::TypeConstraints::class_type, avg 804µs/call # spent 471µs making 28 calls to Moose::Util::TypeConstraints::find_type_constraint, avg 17µs/call
162 unless find_type_constraint($class);
163
164287µs my $meta;
165
1662850µs2837µs if ( $meta = Class::MOP::get_metaclass_by_name($class) ) {
# spent 37µs making 28 calls to Class::MOP::get_metaclass_by_name, avg 1µs/call
167 unless ( $meta->isa("Moose::Meta::Class") ) {
168 if ( $meta->isa('Moose::Meta::Role') ) {
169 throw_exception( MetaclassIsARoleNotASubclassOfGivenMetaclass => role_name => $class,
170 metaclass => $metaclass,
171 role => $meta
172 );
173 } else {
174 throw_exception( MetaclassIsNotASubclassOfGivenMetaclass => class_name => $class,
175 metaclass => $metaclass,
176 class => $meta
177 );
178 }
179 }
180 } else {
181 # no metaclass
182
183 # now we check whether our ancestors have metaclass, and if so borrow that
18428180µs2893µs my ( undef, @isa ) = @{ mro::get_linear_isa($class) };
# spent 93µs making 28 calls to mro::get_linear_isa, avg 3µs/call
185
1862828µs foreach my $ancestor ( @isa ) {
187 my $ancestor_meta = Class::MOP::get_metaclass_by_name($ancestor) || next;
188
189 my $ancestor_meta_class = $ancestor_meta->_real_ref_name;
190
191 # if we have an ancestor metaclass that inherits $metaclass, we use
192 # that. This is like _fix_metaclass_incompatibility, but we can do it now.
193
194 # the case of having an ancestry is not very common, but arises in
195 # e.g. Reaction
196 unless ( $metaclass->isa( $ancestor_meta_class ) ) {
197 if ( $ancestor_meta_class->isa($metaclass) ) {
198 $metaclass = $ancestor_meta_class;
199 }
200 }
201 }
202
2032862µs2814.2ms $meta = $metaclass->initialize($class);
# spent 14.2ms making 28 calls to Moose::Meta::Class::initialize, avg 508µs/call
20428124µs56664µs my $filename = module_notional_filename($meta->name);
# spent 648µs making 28 calls to Module::Runtime::module_notional_filename, avg 23µs/call # spent 17µs making 28 calls to Class::MOP::Package::name, avg 593ns/call
2052829µs $INC{$filename} = '(set by Moose)'
206 unless exists $INC{$filename};
207 }
208
2092825µs if (defined $meta_name) {
210 # also check for inherited non moose 'meta' method?
2112846µs28675µs my $existing = $meta->get_method($meta_name);
# spent 675µs making 28 calls to Class::MOP::Mixin::HasMethods::get_method, avg 24µs/call
212284µs if ($existing && !$existing->isa('Class::MOP::Method::Meta')) {
213 Carp::cluck "Moose is overwriting an existing method named "
214 . "$meta_name in class $class with a method "
215 . "which returns the class's metaclass. If this is "
216 . "actually what you want, you should remove the "
217 . "existing method, otherwise, you should rename or "
218 . "disable this generated method using the "
219 . "'-meta_name' option to 'use Moose'.";
220 }
2212850µs2810.0ms $meta->_add_meta_method($meta_name);
# spent 10.0ms making 28 calls to Class::MOP::Mixin::HasMethods::_add_meta_method, avg 358µs/call
222 }
223
224 # make sure they inherit from Moose::Object
2252868µs5615.0ms $meta->superclasses($base_class)
# spent 24.3ms making 56 calls to Moose::Meta::Class::superclasses, avg 435µs/call, recursion: max depth 1, sum of overlapping time 9.34ms
226 unless $meta->superclasses();
227
2282891µs return $meta;
229}
230
231# This may be used in some older MooseX extensions.
232sub _get_caller {
233 goto &Moose::Exporter::_get_caller;
234}
235
236## make 'em all immutable
237
2382112µs219µs$_->make_immutable(
# spent 9µs making 21 calls to Class::MOP::Class::is_mutable, avg 414ns/call
239 inline_constructor => 1,
240 constructor_name => "_new",
241 # these are Class::MOP accessors, so they need inlining
242 inline_accessors => 1
24322124µs4286.3ms ) for grep { $_->is_mutable }
# spent 80.2ms making 21 calls to Class::MOP::Class::make_immutable, avg 3.82ms/call # spent 6.06ms making 9 calls to Class::MOP::Object::meta, avg 673µs/call # spent 15µs making 2 calls to Moose::Meta::Role::Method::Required::meta, avg 7µs/call # spent 13µs making 1 call to Moose::Meta::TypeCoercion::Union::meta # spent 10µs making 1 call to Moose::Meta::Role::Application::ToRole::meta # spent 9µs making 1 call to Moose::Meta::Role::meta # spent 8µs making 1 call to Moose::Meta::TypeCoercion::meta # spent 8µs making 1 call to Moose::Meta::Role::Composite::meta # spent 8µs making 1 call to Moose::Meta::Role::Application::ToInstance::meta # spent 8µs making 1 call to Moose::Meta::Role::Application::ToClass::meta # spent 7µs making 1 call to Moose::Meta::Role::Application::RoleSummation::meta # spent 7µs making 1 call to Moose::Meta::Role::Application::meta # spent 7µs making 1 call to Class::MOP::Mixin::meta
244 map { $_->meta }
245 qw(
246 Moose::Meta::Attribute
247 Moose::Meta::Class
248 Moose::Meta::Instance
249
250 Moose::Meta::TypeCoercion
251 Moose::Meta::TypeCoercion::Union
252
253 Moose::Meta::Method
254 Moose::Meta::Method::Constructor
255 Moose::Meta::Method::Destructor
256 Moose::Meta::Method::Overridden
257 Moose::Meta::Method::Augmented
258
259 Moose::Meta::Role
260 Moose::Meta::Role::Attribute
261 Moose::Meta::Role::Method
262 Moose::Meta::Role::Method::Required
263 Moose::Meta::Role::Method::Conflicting
264
265 Moose::Meta::Role::Composite
266
267 Moose::Meta::Role::Application
268 Moose::Meta::Role::Application::RoleSummation
269 Moose::Meta::Role::Application::ToClass
270 Moose::Meta::Role::Application::ToRole
271 Moose::Meta::Role::Application::ToInstance
272);
273
27432µs31µs$_->make_immutable(
# spent 1µs making 3 calls to Class::MOP::Class::is_mutable, avg 467ns/call
275 inline_constructor => 0,
276 constructor_name => undef,
277 # these are Class::MOP accessors, so they need inlining
278 inline_accessors => 1
279425µs611.1ms ) for grep { $_->is_mutable }
# spent 10.7ms making 3 calls to Class::MOP::Class::make_immutable, avg 3.56ms/call # spent 409µs making 2 calls to Class::MOP::Object::meta, avg 204µs/call # spent 9µs making 1 call to Class::MOP::Mixin::meta
280 map { $_->meta }
281 qw(
282 Moose::Meta::Method::Accessor
283 Moose::Meta::Method::Delegation
284 Moose::Meta::Mixin::AttributeCore
285);
286
287117µs1;
288
289# ABSTRACT: A postmodern object system for Perl 5
290
291__END__
 
# spent 162µs within Moose::bootstrap which was called: # once (162µs+0s) by DynaLoader::bootstrap at line 207 of DynaLoader.pm
sub Moose::bootstrap; # xsub