Filename | /usr/local/lib/perl/5.18.2/Moose.pm |
Statements | Executed 1165 statements in 10.2ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
94 | 48 | 17 | 6.20ms | 756ms | has | Moose::
1 | 1 | 1 | 3.60ms | 15.8ms | BEGIN@24 | Moose::
1 | 1 | 1 | 3.01ms | 80.0ms | BEGIN@15 | Moose::
1 | 1 | 1 | 2.76ms | 18.5ms | BEGIN@32 | Moose::
1 | 1 | 1 | 1.72ms | 10.4ms | BEGIN@25 | Moose::
1 | 1 | 1 | 1.62ms | 2.67ms | BEGIN@35 | Moose::
28 | 1 | 1 | 1.20ms | 74.3ms | init_meta | Moose::
1 | 1 | 1 | 937µs | 2.95ms | BEGIN@33 | Moose::
1 | 1 | 1 | 929µs | 2.23ms | BEGIN@36 | Moose::
1 | 1 | 1 | 808µs | 2.78ms | BEGIN@30 | Moose::
1 | 1 | 1 | 713µs | 5.38ms | BEGIN@34 | Moose::
1 | 1 | 1 | 697µs | 1.27ms | BEGIN@37 | Moose::
1 | 1 | 1 | 639µs | 105ms | BEGIN@26 | Moose::
1 | 1 | 1 | 398µs | 1.31ms | BEGIN@38 | Moose::
28 | 15 | 15 | 317µs | 1.18s | extends | Moose::
1 | 1 | 1 | 304µs | 1.38ms | BEGIN@43 | Moose::
36 | 19 | 19 | 230µs | 1.10s | with (recurses: max depth 1, inclusive time 7.62ms) | Moose::
1 | 1 | 1 | 162µs | 162µs | bootstrap (xsub) | Moose::
1 | 1 | 1 | 161µs | 1.30ms | BEGIN@28 | Moose::
1 | 1 | 1 | 147µs | 2.04ms | BEGIN@14 | Moose::
2 | 2 | 2 | 25µs | 617µs | override | Moose::
1 | 1 | 1 | 9µs | 9µs | BEGIN@7 | Moose::
1 | 1 | 1 | 9µs | 1.14ms | BEGIN@40 | Moose::
1 | 1 | 1 | 8µs | 19µs | BEGIN@1 | PONAPI::Server::ConfigReader::
1 | 1 | 1 | 8µs | 38µs | BEGIN@12 | Moose::
1 | 1 | 1 | 7µs | 20µs | BEGIN@11 | Moose::
1 | 1 | 1 | 6µs | 118µs | BEGIN@41 | Moose::
1 | 1 | 1 | 6µs | 9µs | BEGIN@2 | PONAPI::Server::ConfigReader::
1 | 1 | 1 | 6µs | 29µs | BEGIN@10 | Moose::
1 | 1 | 1 | 5µs | 5µs | BEGIN@17 | Moose::
1 | 1 | 1 | 4µs | 4µs | BEGIN@27 | Moose::
1 | 1 | 1 | 3µs | 3µs | BEGIN@9 | Moose::
1 | 1 | 1 | 2µs | 2µs | BEGIN@19 | Moose::
0 | 0 | 0 | 0s | 0s | _get_caller | Moose::
0 | 0 | 0 | 0s | 0s | after | Moose::
0 | 0 | 0 | 0s | 0s | around | Moose::
0 | 0 | 0 | 0s | 0s | augment | Moose::
0 | 0 | 0 | 0s | 0s | before | Moose::
0 | 0 | 0 | 0s | 0s | inner | Moose::
0 | 0 | 0 | 0s | 0s | super | Moose::
0 | 0 | 0 | 0s | 0s | throw_error | Moose::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 30µs | 2 | 29µ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 # spent 19µs making 1 call to PONAPI::Server::ConfigReader::BEGIN@1
# spent 10µs making 1 call to strict::import |
2 | 2 | 40µs | 2 | 13µ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 # spent 9µs making 1 call to PONAPI::Server::ConfigReader::BEGIN@2
# spent 3µs making 1 call to warnings::import |
3 | package Moose; # git description: 2.1603-10-g5280cac | ||||
4 | 1 | 900ns | our $VERSION = '2.1604'; | ||
5 | 1 | 300ns | our $AUTHORITY = 'cpan:STEVAN'; | ||
6 | |||||
7 | 2 | 38µs | 1 | 9µs | # spent 9µs within Moose::BEGIN@7 which was called:
# once (9µs+0s) by PONAPI::Server::ConfigReader::BEGIN@4 at line 7 # spent 9µs making 1 call to Moose::BEGIN@7 |
8 | |||||
9 | 2 | 18µs | 1 | 3µs | # spent 3µs within Moose::BEGIN@9 which was called:
# once (3µs+0s) by PONAPI::Server::ConfigReader::BEGIN@4 at line 9 # spent 3µs making 1 call to Moose::BEGIN@9 |
10 | 2 | 24µs | 2 | 52µ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 # spent 29µs making 1 call to Moose::BEGIN@10
# spent 23µs making 1 call to Exporter::import |
11 | 2 | 20µs | 2 | 32µ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 # spent 20µs making 1 call to Moose::BEGIN@11
# spent 13µs making 1 call to Module::Runtime::import |
12 | 2 | 22µs | 2 | 69µ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 # spent 38µs making 1 call to Moose::BEGIN@12
# spent 30µs making 1 call to Exporter::import |
13 | |||||
14 | 2 | 82µs | 2 | 2.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 # spent 2.04ms making 1 call to Moose::BEGIN@14
# spent 5µs making 1 call to Package::DeprecationManager::__ANON__[Package/DeprecationManager.pm:61] |
15 | 2 | 115µs | 2 | 80.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 # spent 80.0ms making 1 call to Moose::BEGIN@15
# spent 49µs making 1 call to Moose::Exporter::import |
16 | |||||
17 | 2 | 37µs | 1 | 5µs | # spent 5µs within Moose::BEGIN@17 which was called:
# once (5µs+0s) by PONAPI::Server::ConfigReader::BEGIN@4 at line 17 # 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 | ||||
20 | 1 | 3µs | die "Class::MOP version $Moose::VERSION required--this is version $Class::MOP::VERSION" | ||
21 | if $Moose::VERSION && $Class::MOP::VERSION ne $Moose::VERSION; | ||||
22 | 1 | 15µs | 1 | 2µs | } # spent 2µs making 1 call to Moose::BEGIN@19 |
23 | |||||
24 | 2 | 115µs | 1 | 15.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 # spent 15.8ms making 1 call to Moose::BEGIN@24 |
25 | 2 | 138µs | 1 | 10.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 # spent 10.4ms making 1 call to Moose::BEGIN@25 |
26 | 2 | 122µs | 1 | 105ms | # 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 # spent 105ms making 1 call to Moose::BEGIN@26 |
27 | 2 | 18µs | 1 | 4µs | # spent 4µs within Moose::BEGIN@27 which was called:
# once (4µs+0s) by PONAPI::Server::ConfigReader::BEGIN@4 at line 27 # spent 4µs making 1 call to Moose::BEGIN@27 |
28 | 2 | 108µs | 1 | 1.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 # spent 1.30ms making 1 call to Moose::BEGIN@28 |
29 | |||||
30 | 2 | 113µs | 1 | 2.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 # spent 2.78ms making 1 call to Moose::BEGIN@30 |
31 | |||||
32 | 2 | 122µs | 1 | 18.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 # spent 18.5ms making 1 call to Moose::BEGIN@32 |
33 | 2 | 128µs | 1 | 2.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 # spent 2.95ms making 1 call to Moose::BEGIN@33 |
34 | 2 | 101µs | 1 | 5.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 # spent 5.38ms making 1 call to Moose::BEGIN@34 |
35 | 2 | 117µs | 1 | 2.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 # spent 2.67ms making 1 call to Moose::BEGIN@35 |
36 | 2 | 118µs | 1 | 2.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 # spent 2.23ms making 1 call to Moose::BEGIN@36 |
37 | 2 | 102µs | 1 | 1.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 # spent 1.27ms making 1 call to Moose::BEGIN@37 |
38 | 2 | 92µs | 1 | 1.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 # spent 1.31ms making 1 call to Moose::BEGIN@38 |
39 | |||||
40 | 2 | 29µs | 2 | 2.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 # spent 1.14ms making 1 call to Moose::BEGIN@40
# spent 1.13ms making 1 call to Moose::Util::TypeConstraints::import |
41 | 2 | 30µs | 2 | 230µ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 # 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 | |||||
43 | 2 | 869µs | 1 | 1.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 # 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 | ||||
46 | 14 | 17µs | my $meta = shift; | ||
47 | |||||
48 | 14 | 7µ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 | ||||
55 | 14 | 64µs | 14 | 591ms | $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 | ||||
59 | 18 | 81µs | 18 | 547ms | 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 | |||||
62 | sub 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 | ||||
68 | 47 | 18µs | my $meta = shift; | ||
69 | 47 | 17µs | my $name = shift; | ||
70 | |||||
71 | 47 | 139µs | 47 | 402µs | my %context = Moose::Util::_caller_info; # spent 402µs making 47 calls to Moose::Util::_caller_info, avg 9µs/call |
72 | 47 | 40µs | $context{context} = 'has declaration'; | ||
73 | 47 | 25µs | $context{type} = 'class'; | ||
74 | 47 | 112µs | my @options = ( definition_context => \%context, @_ ); | ||
75 | 47 | 54µs | my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ]; | ||
76 | 47 | 5.34ms | 49 | 374ms | $meta->add_attribute( $_, @options ) for @$attrs; # spent 374ms making 49 calls to Moose::Meta::Class::add_attribute, avg 7.63ms/call |
77 | } | ||||
78 | |||||
79 | sub before { | ||||
80 | Moose::Util::add_method_modifier(shift, 'before', \@_); | ||||
81 | } | ||||
82 | |||||
83 | sub after { | ||||
84 | Moose::Util::add_method_modifier(shift, 'after', \@_); | ||||
85 | } | ||||
86 | |||||
87 | sub around { | ||||
88 | Moose::Util::add_method_modifier(shift, 'around', \@_); | ||||
89 | } | ||||
90 | |||||
91 | 1 | 100ns | our $SUPER_PACKAGE; | ||
92 | 1 | 0s | our $SUPER_BODY; | ||
93 | 1 | 300ns | our @SUPER_ARGS; | ||
94 | |||||
95 | sub 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 | ||||
107 | 1 | 400ns | my $meta = shift; | ||
108 | 1 | 400ns | my ( $name, $method ) = @_; | ||
109 | 1 | 16µs | 1 | 291µs | $meta->add_override_method_modifier( $name => $method ); # spent 291µs making 1 call to Moose::Meta::Class::add_override_method_modifier |
110 | } | ||||
111 | |||||
112 | sub 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 | |||||
126 | sub augment { | ||||
127 | my $meta = shift; | ||||
128 | my ( $name, $method ) = @_; | ||||
129 | $meta->add_augment_method_modifier( $name => $method ); | ||||
130 | } | ||||
131 | |||||
132 | 1 | 6µs | 1 | 769µs | Moose::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 | ||||
144 | 28 | 5µs | shift; | ||
145 | 28 | 53µs | my %args = @_; | ||
146 | |||||
147 | 28 | 21µs | my $class = $args{for_class} | ||
148 | or throw_exception( InitMetaRequiresClass => params => \%args ); | ||||
149 | |||||
150 | 28 | 19µs | my $base_class = $args{base_class} || 'Moose::Object'; | ||
151 | 28 | 12µs | my $metaclass = $args{metaclass} || 'Moose::Meta::Class'; | ||
152 | 28 | 21µs | my $meta_name = exists $args{meta_name} ? $args{meta_name} : 'meta'; | ||
153 | |||||
154 | 28 | 184µs | 28 | 99µ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 | |||||
157 | 28 | 108µs | 28 | 29µ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 | ||||
161 | 28 | 101µs | 56 | 23.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 | |||||
164 | 28 | 7µs | my $meta; | ||
165 | |||||
166 | 28 | 50µs | 28 | 37µ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 | ||||
184 | 28 | 180µs | 28 | 93µ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 | |||||
186 | 28 | 28µ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 | |||||
203 | 28 | 62µs | 28 | 14.2ms | $meta = $metaclass->initialize($class); # spent 14.2ms making 28 calls to Moose::Meta::Class::initialize, avg 508µs/call |
204 | 28 | 124µs | 56 | 664µ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 |
205 | 28 | 29µs | $INC{$filename} = '(set by Moose)' | ||
206 | unless exists $INC{$filename}; | ||||
207 | } | ||||
208 | |||||
209 | 28 | 25µs | if (defined $meta_name) { | ||
210 | # also check for inherited non moose 'meta' method? | ||||
211 | 28 | 46µs | 28 | 675µ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 |
212 | 28 | 4µ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 | } | ||||
221 | 28 | 50µs | 28 | 10.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 | ||||
225 | 28 | 68µs | 56 | 15.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 | |||||
228 | 28 | 91µs | return $meta; | ||
229 | } | ||||
230 | |||||
231 | # This may be used in some older MooseX extensions. | ||||
232 | sub _get_caller { | ||||
233 | goto &Moose::Exporter::_get_caller; | ||||
234 | } | ||||
235 | |||||
236 | ## make 'em all immutable | ||||
237 | |||||
238 | 21 | 12µs | 21 | 9µ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 | ||||
243 | 22 | 124µs | 42 | 86.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 | |||||
274 | 3 | 2µs | 3 | 1µ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 | ||||
279 | 4 | 25µs | 6 | 11.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 | |||||
287 | 1 | 17µs | 1; | ||
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 |