Filename | /usr/local/lib/perl/5.18.2/Scalar/Util.pm |
Statements | Executed 13 statements in 292µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
6678026 | 64 | 33 | 4.73s | 4.73s | blessed (xsub) | Scalar::Util::
1234404 | 22 | 15 | 1.45s | 1.45s | weaken (xsub) | Scalar::Util::
402370 | 7 | 3 | 594ms | 594ms | refaddr (xsub) | Scalar::Util::
2558 | 5 | 4 | 1.08ms | 1.08ms | reftype (xsub) | Scalar::Util::
375 | 1 | 1 | 222µs | 222µs | isweak (xsub) | Scalar::Util::
1 | 1 | 1 | 8µs | 16µs | BEGIN@9 | Scalar::Util::
0 | 0 | 0 | 0s | 0s | export_fail | Scalar::Util::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
2 | # This program is free software; you can redistribute it and/or | ||||
3 | # modify it under the same terms as Perl itself. | ||||
4 | # | ||||
5 | # Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk> | ||||
6 | |||||
7 | package Scalar::Util; | ||||
8 | |||||
9 | 2 | 185µs | 2 | 25µs | # spent 16µs (8+9) within Scalar::Util::BEGIN@9 which was called:
# once (8µs+9µs) by Module::Pluggable::Object::BEGIN@4 at line 9 # spent 16µs making 1 call to Scalar::Util::BEGIN@9
# spent 9µs making 1 call to strict::import |
10 | 1 | 300ns | require Exporter; | ||
11 | 1 | 82µs | require List::Util; # List::Util loads the XS | ||
12 | |||||
13 | 1 | 4µs | our @ISA = qw(Exporter); | ||
14 | 1 | 2µs | our @EXPORT_OK = qw( | ||
15 | blessed refaddr reftype weaken unweaken isweak | ||||
16 | |||||
17 | dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted | ||||
18 | ); | ||||
19 | 1 | 400ns | our $VERSION = "1.39"; | ||
20 | 1 | 13µs | $VERSION = eval $VERSION; # spent 1µs executing statements in string eval | ||
21 | |||||
22 | 1 | 200ns | our @EXPORT_FAIL; | ||
23 | |||||
24 | 1 | 400ns | unless (defined &weaken) { | ||
25 | push @EXPORT_FAIL, qw(weaken); | ||||
26 | } | ||||
27 | 1 | 100ns | unless (defined &isweak) { | ||
28 | push @EXPORT_FAIL, qw(isweak isvstring); | ||||
29 | } | ||||
30 | 1 | 100ns | unless (defined &isvstring) { | ||
31 | push @EXPORT_FAIL, qw(isvstring); | ||||
32 | } | ||||
33 | |||||
34 | sub export_fail { | ||||
35 | if (grep { /^(?:weaken|isweak)$/ } @_ ) { | ||||
36 | require Carp; | ||||
37 | Carp::croak("Weak references are not implemented in the version of perl"); | ||||
38 | } | ||||
39 | |||||
40 | if (grep { /^isvstring$/ } @_ ) { | ||||
41 | require Carp; | ||||
42 | Carp::croak("Vstrings are not implemented in the version of perl"); | ||||
43 | } | ||||
44 | |||||
45 | @_; | ||||
46 | } | ||||
47 | |||||
48 | 1 | 5µs | 1; | ||
49 | |||||
50 | __END__ | ||||
# spent 4.73s within Scalar::Util::blessed which was called 6678026 times, avg 709ns/call:
# 1330943 times (819ms+0s) by PONAPI::Builder::Document::new or PONAPI::Builder::Links::new or PONAPI::Builder::Relationship::new or PONAPI::Builder::Resource::Identifier::new or PONAPI::Builder::Resource::new or PONAPI::DAO::Request::Retrieve::new or PONAPI::DAO::Request::RetrieveAll::new or PONAPI::DAO::new or PONAPI::Server::ConfigReader::new or Test::PONAPI::Repository::MockDB::Loader::new or Test::PONAPI::Repository::MockDB::Table::Articles::new or Test::PONAPI::Repository::MockDB::Table::Comments::new or Test::PONAPI::Repository::MockDB::Table::People::new or Test::PONAPI::Repository::MockDB::Table::Relationships::new or Test::PONAPI::Repository::MockDB::new at line 12 of (eval 45)[Eval/Closure.pm:144], avg 615ns/call
# 1330934 times (673ms+0s) by PONAPI::Builder::Document::DESTROY or PONAPI::Builder::Links::DESTROY or PONAPI::Builder::Relationship::DESTROY or PONAPI::Builder::Resource::DESTROY or PONAPI::Builder::Resource::Identifier::DESTROY or PONAPI::DAO::Request::Retrieve::DESTROY or PONAPI::DAO::Request::RetrieveAll::DESTROY or PONAPI::Server::ConfigReader::DESTROY or Test::PONAPI::Repository::MockDB::Loader::DESTROY at line 5 of (eval 45)[Eval/Closure.pm:144], avg 505ns/call
# 1230964 times (1.09s+0s) by Moose::Object::does at line 119 of Moose/Object.pm, avg 883ns/call
# 1230932 times (592ms+0s) by Class::MOP::Class:::around at line 38 of Moose/Meta/Class/Immutable/Trait.pm, avg 481ns/call
# 529025 times (397ms+0s) by PONAPI::Builder::Document::links_builder or PONAPI::Builder::Relationship::links_builder or PONAPI::Builder::Resource::links_builder or Test::PONAPI::Repository::MockDB::Loader::dbh at line 19 of (eval 45)[Eval/Closure.pm:144], avg 751ns/call
# 443130 times (313ms+0s) by PONAPI::Builder::Document::_add_included or PONAPI::Builder::Document::_add_resource_builder or PONAPI::Builder::Relationship::_add_resource_id_builder at line 21 of (eval 45)[Eval/Closure.pm:144], avg 707ns/call
# 172883 times (109ms+0s) by PONAPI::Builder::Resource::_add_relationship at line 34 of (eval 45)[Eval/Closure.pm:144], avg 630ns/call
# 100001 times (317ms+0s) by HTTP::Headers::ActionPack::MediaTypeList::canonicalize_choice at line 77 of HTTP/Headers/ActionPack/MediaTypeList.pm, avg 3µs/call
# 100001 times (150ms+0s) by PONAPI::DAO::Request::Retrieve::new or PONAPI::DAO::Request::RetrieveAll::new at line 24 of (eval 45)[Eval/Closure.pm:144], avg 1µs/call
# 100001 times (110ms+0s) by PONAPI::Builder::Document::has_link at line 95 of Moose/Meta/Method/Delegation.pm, avg 1µs/call
# 50245 times (81.9ms+0s) by PONAPI::DAO::Request::RetrieveAll::new at line 87 of (eval 45)[Eval/Closure.pm:144], avg 2µs/call
# 49756 times (80.1ms+0s) by PONAPI::DAO::Request::Retrieve::new at line 94 of (eval 45)[Eval/Closure.pm:144], avg 2µs/call
# 1263 times (947µs+0s) by Class::MOP::Mixin::HasMethods::add_method at line 54 of Class/MOP/Mixin/HasMethods.pm, avg 750ns/call
# 997 times (621µs+0s) by Class::MOP::Mixin::HasMethods::get_method at line 114 of Class/MOP/Mixin/HasMethods.pm, avg 623ns/call
# 747 times (282µs+0s) by Class::MOP::class_of at line 57 of Class/MOP.pm, avg 377ns/call
# 733 times (439µs+0s) by Class::MOP::Method::clone at line 138 of Class/MOP/Method.pm, avg 599ns/call
# 704 times (255µs+0s) by Moose::Meta::Attribute::_new or Moose::Meta::Instance::_new or Moose::Meta::Method::Overridden::_new or Moose::Meta::Method::_new or Moose::Meta::Role::Application::RoleSummation::_new or Moose::Meta::Role::Application::ToClass::_new or Moose::Meta::Role::Application::ToRole::_new or Moose::Meta::Role::Composite::_new or Moose::Meta::Role::Method::Conflicting::_new or Moose::Meta::Role::Method::Required::_new or Moose::Meta::Role::Method::_new or Moose::Meta::Role::_new or Moose::Meta::TypeConstraint::Class::_new or Moose::Meta::TypeConstraint::Parameterizable::_new or Moose::Meta::TypeConstraint::Parameterized::_new or Moose::Meta::TypeConstraint::Role::_new or Moose::Meta::TypeConstraint::Union::_new or Moose::Meta::TypeConstraint::_new at line 6 of (eval 45)[Eval/Closure.pm:144], avg 362ns/call
# 495 times (280µs+0s) by Class::MOP::Mixin::meta or Class::MOP::Object::meta or Moose::Meta::Class::__ANON__::SERIAL::1::meta or Moose::Meta::Class::__ANON__::SERIAL::7::meta or Moose::Meta::Role::Application::RoleSummation::meta or Moose::Meta::Role::Application::ToClass::meta or Moose::Meta::Role::Application::ToInstance::meta or Moose::Meta::Role::Application::ToRole::meta or Moose::Meta::Role::Application::meta or Moose::Meta::Role::Composite::meta or Moose::Meta::Role::Method::Required::meta or Moose::Meta::Role::meta or Moose::Meta::TypeCoercion::Union::meta or Moose::Meta::TypeCoercion::meta or Moose::Meta::TypeConstraint::Class::meta or Moose::Meta::TypeConstraint::DuckType::meta or Moose::Meta::TypeConstraint::Enum::meta or Moose::Meta::TypeConstraint::Parameterizable::meta or Moose::Meta::TypeConstraint::Parameterized::meta or Moose::Meta::TypeConstraint::Registry::meta or Moose::Meta::TypeConstraint::Role::meta or Moose::Meta::TypeConstraint::Union::meta or Moose::Meta::TypeConstraint::meta or PONAPI::Builder::Document::meta or PONAPI::Builder::Errors::meta or PONAPI::Builder::Links::meta or PONAPI::Builder::Relationship::meta or PONAPI::Builder::Resource::Identifier::meta or PONAPI::Builder::Resource::Null::meta or PONAPI::Builder::Resource::meta or PONAPI::DAO::Request::Create::meta or PONAPI::DAO::Request::CreateRelationships::meta or PONAPI::DAO::Request::Delete::meta or PONAPI::DAO::Request::DeleteRelationships::meta or PONAPI::DAO::Request::Retrieve::meta or PONAPI::DAO::Request::RetrieveAll::meta or PONAPI::DAO::Request::RetrieveByRelationship::meta or PONAPI::DAO::Request::RetrieveRelationships::meta or PONAPI::DAO::Request::Update::meta or PONAPI::DAO::Request::UpdateRelationships::meta or PONAPI::DAO::Request::meta or PONAPI::DAO::meta or PONAPI::Exception::meta or PONAPI::Server::ConfigReader::meta or Test::PONAPI::Repository::MockDB::Loader::meta or Test::PONAPI::Repository::MockDB::Table::Articles::meta or Test::PONAPI::Repository::MockDB::Table::Comments::meta or Test::PONAPI::Repository::MockDB::Table::People::meta or Test::PONAPI::Repository::MockDB::Table::Relationships::meta or Test::PONAPI::Repository::MockDB::Table::meta or Test::PONAPI::Repository::MockDB::meta at line 42 of Class/MOP/Method/Meta.pm, avg 565ns/call
# 479 times (194µs+0s) by Class::MOP::Method::wrap at line 30 of Class/MOP/Method.pm, avg 404ns/call
# 451 times (182µs+0s) by Moose::Util::TypeConstraints::find_type_constraint at line 298 of Moose/Util/TypeConstraints.pm, avg 403ns/call
# 383 times (316µs+0s) by Class::MOP::Method::Accessor::new at line 26 of Class/MOP/Method/Accessor.pm, avg 826ns/call
# 317 times (345µs+0s) by Class::MOP::Class::_construct_instance at line 508 of Class/MOP/Class.pm, avg 1µs/call
# 312 times (186µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 14 of Class/MOP/Mixin/HasAttributes.pm, avg 595ns/call
# 240 times (157µs+0s) by Class::MOP::Attribute::attach_to_class at line 252 of Class/MOP/Attribute.pm, avg 655ns/call
# 213 times (117µs+0s) by Moose::Meta::Role::Composite::add_method at line 102 of Moose/Meta/Role/Composite.pm, avg 549ns/call
# 198 times (71µs+0s) by Moose::Meta::Attribute::_process_isa_option at line 333 of Moose/Meta/Attribute.pm, avg 360ns/call
# 160 times (78µs+0s) by Class::MOP::Instance::BUILDARGS at line 17 of Class/MOP/Instance.pm, avg 485ns/call
# 144 times (67µs+0s) by Moose::Meta::Role::add_attribute at line 238 of Moose/Meta/Role.pm, avg 465ns/call
# 132 times (89µs+0s) by Moose::Meta::Class::_anon_cache_key at line 118 of Moose/Meta/Class.pm, avg 677ns/call
# 111 times (58µs+0s) by Moose::Meta::Role::Application::RoleSummation::get_method_aliases_for_role at line 39 of Moose/Meta/Role/Application/RoleSummation.pm, avg 521ns/call
# 109 times (72µs+0s) by Moose::Meta::Class::add_attribute at line 569 of Moose/Meta/Class.pm, avg 664ns/call
# 96 times (99µs+0s) by Moose::Meta::TypeConstraint::Registry::add_type_constraint at line 47 of Moose/Meta/TypeConstraint/Registry.pm, avg 1µs/call
# 92 times (46µs+0s) by Moose::Util::_apply_all_roles at line 143 of Moose/Util.pm, avg 503ns/call
# 92 times (30µs+0s) by Devel::OverloadInfo::is_overloaded at line 52 of Devel/OverloadInfo.pm, avg 330ns/call
# 72 times (41µs+0s) by Moose::Meta::Role::Attribute::attach_to_role at line 70 of Moose/Meta/Role/Attribute.pm, avg 564ns/call
# 69 times (40µs+0s) by Moose::Meta::Role::combine at line 485 of Moose/Meta/Role.pm, avg 581ns/call
# 69 times (36µs+0s) by Moose::Meta::Role::Application::RoleSummation::get_exclusions_for_role at line 25 of Moose/Meta/Role/Application/RoleSummation.pm, avg 522ns/call
# 66 times (38µs+0s) by Class::MOP::Method::Wrapped::wrap at line 70 of Class/MOP/Method/Wrapped.pm, avg 570ns/call
# 59 times (25µs+0s) by Class::MOP::Mixin::meta at line 12 of Class/MOP/Mixin.pm, avg 419ns/call
# 47 times (25µs+0s) by Moose::Meta::Role::add_required_methods at line 264 of Moose/Meta/Role.pm, avg 534ns/call
# 42 times (45µs+0s) by Moose::Util::_apply_all_roles at line 164 of Moose/Util.pm, avg 1µs/call
# 42 times (31µs+0s) by Moose::Meta::Role::apply at line 445 of Moose/Meta/Role.pm, avg 743ns/call
# 42 times (24µs+0s) by Moose::Util::_apply_all_roles at line 168 of Moose/Util.pm, avg 562ns/call
# 32 times (18µs+0s) by Moose::Meta::Attribute::Native::Trait::_check_helper_type at line 29 of Moose/Meta/Attribute/Native/Trait.pm, avg 559ns/call
# 30 times (24µs+0s) by Class::MOP::Method::Constructor::new at line 16 of Class/MOP/Method/Constructor.pm, avg 810ns/call
# 28 times (30µs+0s) by Moose::Meta::Method::Destructor::is_needed at line 61 of Moose/Meta/Method/Destructor.pm, avg 1µs/call
# 28 times (27µs+0s) by Moose::Meta::Class::add_role at line 181 of Moose/Meta/Class.pm, avg 950ns/call
# 28 times (20µs+0s) by Moose::Meta::Class::add_role_application at line 197 of Moose/Meta/Class.pm, avg 718ns/call
# 17 times (16µs+0s) by Moose::Meta::Method::Accessor::Native::Writer::_is_root_type at line 92 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 918ns/call
# 16 times (7µs+0s) by Moose::Util::TypeConstraints::_create_type_constraint at line 572 of Moose/Util/TypeConstraints.pm, avg 456ns/call
# 14 times (12µs+0s) by Moose::Meta::Role::add_role at line 404 of Moose/Meta/Role.pm, avg 843ns/call
# 9 times (5µs+0s) by Moose::Meta::Attribute::_process_does_option at line 359 of Moose/Meta/Attribute.pm, avg 544ns/call
# 7 times (6µs+0s) by Moose::Meta::TypeConstraint::Parameterized::compile_type_constraint at line 50 of Moose/Meta/TypeConstraint/Parameterized.pm, avg 929ns/call
# 6 times (5µs+0s) by Moose::Meta::Method::Delegation::new at line 23 of Moose/Meta/Method/Delegation.pm, avg 767ns/call
# 6 times (2µs+0s) by Moose::Meta::Method::Delegation::_get_delegate_accessor at line 131 of Moose/Meta/Method/Delegation.pm, avg 383ns/call
# 4 times (3µs+0s) by List::Util::all at line 41 of (eval 45)[Eval/Closure.pm:144], avg 750ns/call
# 3 times (2µs+0s) by Path::Class::Dir::new at line 39 of Path/Class/Dir.pm, avg 767ns/call
# once (5µs+0s) by Test::PONAPI::Repository::MockDB::_set_dbh at line 7 of (eval 45)[Eval/Closure.pm:144]
# once (1µs+0s) by PONAPI::Server::ConfigReader::new at line 53 of (eval 45)[Eval/Closure.pm:144]
# once (1µs+0s) by Moose::Meta::Attribute::_weaken_value at line 796 of Moose/Meta/Attribute.pm
# once (800ns+0s) by PONAPI::DAO::new at line 46 of (eval 45)[Eval/Closure.pm:144]
# once (700ns+0s) by Class::MOP::Mixin::HasMethods::remove_method at line 146 of Class/MOP/Mixin/HasMethods.pm
# once (500ns+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm
# once (400ns+0s) by PONAPI::Server::ConfigReader::new at line 50 of (eval 45)[Eval/Closure.pm:144] | |||||
# spent 222µs within Scalar::Util::isweak which was called 375 times, avg 593ns/call:
# 375 times (222µs+0s) by Class::MOP::metaclass_is_weak at line 50 of Class/MOP.pm, avg 593ns/call | |||||
# spent 594ms within Scalar::Util::refaddr which was called 402370 times, avg 1µs/call:
# 102107 times (59.1ms+0s) by Hash::MultiValue::get_all at line 78 of Hash/MultiValue.pm, avg 579ns/call
# 100001 times (293ms+0s) by Hash::MultiValue::DESTROY at line 65 of Hash/MultiValue.pm, avg 3µs/call
# 100001 times (185ms+0s) by Hash::MultiValue::create at line 43 of Hash/MultiValue.pm, avg 2µs/call
# 100001 times (57.3ms+0s) by Hash::MultiValue::merge_flat at line 143 of Hash/MultiValue.pm, avg 573ns/call
# 176 times (69µs+0s) by Moose::Meta::TypeConstraint::__ANON__[/usr/local/lib/perl/5.18.2/Moose/Meta/TypeConstraint.pm:8] at line 8 of Moose/Meta/TypeConstraint.pm, avg 390ns/call
# 56 times (42µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 68 of Class/MOP/Method/Inlined.pm, avg 741ns/call
# 28 times (10µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 73 of Class/MOP/Method/Inlined.pm, avg 354ns/call | |||||
# spent 1.08ms within Scalar::Util::reftype which was called 2558 times, avg 421ns/call:
# 948 times (346µs+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm, avg 364ns/call
# 535 times (232µs+0s) by Eval::Closure::_validate_env at line 80 of Eval/Closure.pm, avg 434ns/call
# 479 times (160µs+0s) by Class::MOP::Method::wrap at line 30 of Class/MOP/Method.pm, avg 333ns/call
# 375 times (244µs+0s) by Eval::Closure::_canonicalize_source at line 56 of Eval/Closure.pm, avg 651ns/call
# 221 times (96µs+0s) by Class::MOP::Mixin::HasMethods::wrap_method_body at line 36 of Class/MOP/Mixin/HasMethods.pm, avg 433ns/call | |||||
# spent 1.45s within Scalar::Util::weaken which was called 1234404 times, avg 1µs/call:
# 529024 times (570ms+0s) by PONAPI::Builder::Links::new at line 52 of (eval 45)[Eval/Closure.pm:144], avg 1µs/call
# 270247 times (343ms+0s) by PONAPI::Builder::Resource::new at line 64 of (eval 45)[Eval/Closure.pm:144], avg 1µs/call
# 172883 times (176ms+0s) by PONAPI::Builder::Resource::Identifier::new at line 61 of (eval 45)[Eval/Closure.pm:144], avg 1µs/call
# 158776 times (167ms+0s) by PONAPI::Builder::Relationship::new at line 70 of (eval 45)[Eval/Closure.pm:144], avg 1µs/call
# 100001 times (194ms+0s) by Hash::MultiValue::create at line 46 of Hash/MultiValue.pm, avg 2µs/call
# 1240 times (745µs+0s) by Class::MOP::Method::attach_to_class at line 80 of Class/MOP/Method.pm, avg 601ns/call
# 733 times (379µs+0s) by Class::MOP::Method::clone at line 139 of Class/MOP/Method.pm, avg 517ns/call
# 388 times (324µs+0s) by Class::MOP::Method::wrap at line 51 of Class/MOP/Method.pm, avg 836ns/call
# 383 times (343µs+0s) by Class::MOP::Method::Accessor::new at line 41 of Class/MOP/Method/Accessor.pm, avg 895ns/call
# 240 times (193µs+0s) by Class::MOP::Attribute::attach_to_class at line 256 of Class/MOP/Attribute.pm, avg 803ns/call
# 160 times (133µs+0s) by Class::MOP::Instance::new at line 41 of Class/MOP/Instance.pm, avg 829ns/call
# 97 times (99µs+0s) by Class::MOP::Method::Meta::_generate_meta_method at line 23 of Class/MOP/Method/Meta.pm, avg 1µs/call
# 72 times (52µs+0s) by Moose::Meta::Role::Attribute::attach_to_role at line 75 of Moose/Meta/Role/Attribute.pm, avg 715ns/call
# 30 times (28µs+0s) by Class::MOP::Method::Constructor::new at line 32 of Class/MOP/Method/Constructor.pm, avg 933ns/call
# 28 times (31µs+0s) by Moose::Meta::Method::Constructor::new at line 43 of Moose/Meta/Method/Constructor.pm, avg 1µs/call
# 28 times (26µs+0s) by Moose::Meta::Role::Application::ToClass::apply at line 28 of Moose/Meta/Role/Application/ToClass.pm, avg 929ns/call
# 28 times (24µs+0s) by Moose::Meta::Method::Destructor::new at line 44 of Moose/Meta/Method/Destructor.pm, avg 839ns/call
# 28 times (15µs+0s) by Moose::Meta::Role::Application::ToClass::apply at line 29 of Moose/Meta/Role/Application/ToClass.pm, avg 529ns/call
# 10 times (7µs+0s) by Class::MOP::Package::create_anon at line 124 of Class/MOP/Package.pm, avg 730ns/call
# 6 times (4µs+0s) by Moose::Meta::Method::Delegation::new at line 51 of Moose/Meta/Method/Delegation.pm, avg 583ns/call
# once (2µs+0s) by DBD::SQLite::BEGIN@5 at line 308 of DBI.pm
# once (2µs+0s) by Class::MOP::Instance::weaken_slot_value at line 157 of Class/MOP/Instance.pm |