Filename | /usr/local/lib/perl/5.14.2/Scalar/Util.pm |
Statements | Executed 13 statements in 327µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
3127 | 48 | 26 | 2.10ms | 2.10ms | blessed (xsub) | Scalar::Util::
1331 | 12 | 9 | 1.23ms | 1.23ms | weaken (xsub) | Scalar::Util::
944 | 6 | 5 | 577µs | 577µs | reftype (xsub) | Scalar::Util::
153 | 1 | 1 | 90µs | 90µs | isweak (xsub) | Scalar::Util::
1 | 1 | 1 | 13µs | 16µs | BEGIN@11 | Scalar::Util::
12 | 2 | 2 | 9µs | 9µs | refaddr (xsub) | Scalar::Util::
0 | 0 | 0 | 0s | 0s | export_fail | Scalar::Util::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # Scalar::Util.pm | ||||
2 | # | ||||
3 | # Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
4 | # This program is free software; you can redistribute it and/or | ||||
5 | # modify it under the same terms as Perl itself. | ||||
6 | # | ||||
7 | # Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk> | ||||
8 | |||||
9 | package Scalar::Util; | ||||
10 | |||||
11 | 2 | 215µs | 2 | 19µs | # spent 16µs (13+3) within Scalar::Util::BEGIN@11 which was called:
# once (13µs+3µs) by Value::Convertor::BEGIN@53 at line 11 # spent 16µs making 1 call to Scalar::Util::BEGIN@11
# spent 3µs making 1 call to strict::import |
12 | 1 | 500ns | require Exporter; | ||
13 | 1 | 74µs | require List::Util; # List::Util loads the XS | ||
14 | |||||
15 | 1 | 5µs | our @ISA = qw(Exporter); | ||
16 | 1 | 2µs | our @EXPORT_OK = qw( | ||
17 | blessed | ||||
18 | dualvar | ||||
19 | isdual | ||||
20 | isvstring | ||||
21 | isweak | ||||
22 | looks_like_number | ||||
23 | openhandle | ||||
24 | readonly | ||||
25 | refaddr | ||||
26 | reftype | ||||
27 | set_prototype | ||||
28 | tainted | ||||
29 | weaken | ||||
30 | ); | ||||
31 | 1 | 300ns | our $VERSION = "1.35"; | ||
32 | 1 | 22µs | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval | ||
33 | |||||
34 | 1 | 200ns | our @EXPORT_FAIL; | ||
35 | |||||
36 | 1 | 500ns | unless (defined &weaken) { | ||
37 | push @EXPORT_FAIL, qw(weaken); | ||||
38 | } | ||||
39 | 1 | 200ns | unless (defined &isweak) { | ||
40 | push @EXPORT_FAIL, qw(isweak isvstring); | ||||
41 | } | ||||
42 | 1 | 100ns | unless (defined &isvstring) { | ||
43 | push @EXPORT_FAIL, qw(isvstring); | ||||
44 | } | ||||
45 | |||||
46 | sub export_fail { | ||||
47 | if (grep { /^(?:weaken|isweak)$/ } @_ ) { | ||||
48 | require Carp; | ||||
49 | Carp::croak("Weak references are not implemented in the version of perl"); | ||||
50 | } | ||||
51 | |||||
52 | if (grep { /^isvstring$/ } @_ ) { | ||||
53 | require Carp; | ||||
54 | Carp::croak("Vstrings are not implemented in the version of perl"); | ||||
55 | } | ||||
56 | |||||
57 | @_; | ||||
58 | } | ||||
59 | |||||
60 | 1 | 7µs | 1; | ||
61 | |||||
62 | __END__ | ||||
# spent 2.10ms within Scalar::Util::blessed which was called 3127 times, avg 673ns/call:
# 501 times (361µs+0s) by Class::MOP::Mixin::HasMethods::add_method at line 62 of Class/MOP/Mixin/HasMethods.pm, avg 720ns/call
# 422 times (261µs+0s) by Class::MOP::Mixin::meta or Class::MOP::Object::meta or MongoDB::Collection::meta or MongoDB::Connection::meta or MongoDB::Cursor::meta or MongoDB::Database::meta or MongoDB::MongoClient::meta or MongoDB::OID::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 at line 48 of Class/MOP/Method/Meta.pm, avg 619ns/call
# 252 times (204µs+0s) by Class::MOP::Method::Accessor::new at line 29 of Class/MOP/Method/Accessor.pm, avg 809ns/call
# 222 times (145µs+0s) by Class::MOP::Method::wrap at line 33 of Class/MOP/Method.pm, avg 654ns/call
# 217 times (166µs+0s) by Class::MOP::Mixin::HasMethods::get_method at line 122 of Class/MOP/Mixin/HasMethods.pm, avg 763ns/call
# 186 times (96µs+0s) by Moose::Meta::Attribute::_new or Moose::Meta::Instance::_new or Moose::Meta::Method::_new or Moose::Meta::TypeConstraint::Class::_new or Moose::Meta::TypeConstraint::Parameterizable::_new or Moose::Meta::TypeConstraint::Union::_new or Moose::Meta::TypeConstraint::_new at line 6 of (eval 62)[Eval/Closure.pm:144], avg 519ns/call
# 181 times (119µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 20 of Class/MOP/Mixin/HasAttributes.pm, avg 657ns/call
# 181 times (95µs+0s) by Class::MOP::Attribute::attach_to_class at line 240 of Class/MOP/Attribute.pm, avg 527ns/call
# 124 times (76µs+0s) by Class::MOP::class_of at line 65 of Class/MOP.pm, avg 615ns/call
# 118 times (135µs+0s) by Class::MOP::Class::_construct_instance at line 510 of Class/MOP/Class.pm, avg 1µs/call
# 105 times (73µs+0s) by Class::MOP::Instance::BUILDARGS at line 23 of Class/MOP/Instance.pm, avg 693ns/call
# 105 times (54µs+0s) by Moose::Meta::Attribute::_process_isa_option at line 361 of Moose/Meta/Attribute.pm, avg 514ns/call
# 104 times (46µs+0s) by Moose::Util::TypeConstraints::find_type_constraint at line 312 of Moose/Util/TypeConstraints.pm, avg 444ns/call
# 58 times (30µs+0s) by Moose::Meta::Class::add_attribute at line 576 of Moose/Meta/Class.pm, avg 512ns/call
# 46 times (26µs+0s) by Class::MOP::Method::Wrapped::wrap at line 76 of Class/MOP/Method/Wrapped.pm, avg 567ns/call
# 36 times (26µs+0s) by Moose::Meta::Method::Delegation::new at line 27 of Moose/Meta/Method/Delegation.pm, avg 733ns/call
# 36 times (19µs+0s) by Moose::Meta::Method::Delegation::_get_delegate_accessor at line 131 of Moose/Meta/Method/Delegation.pm, avg 522ns/call
# 35 times (31µs+0s) by Moose::Meta::TypeConstraint::Registry::add_type_constraint at line 51 of Moose/Meta/TypeConstraint/Registry.pm, avg 883ns/call
# 33 times (20µs+0s) by Class::MOP::Object::meta at line 20 of Class/MOP/Object.pm, avg 603ns/call
# 30 times (24µs+0s) by Class::MOP::Method::Constructor::new at line 23 of Class/MOP/Method/Constructor.pm, avg 787ns/call
# 28 times (18µs+0s) by Class::MOP::Method::clone at line 135 of Class/MOP/Method.pm, avg 650ns/call
# 19 times (13µs+0s) by Moose::Util::TypeConstraints::_create_type_constraint at line 565 of Moose/Util/TypeConstraints.pm, avg 684ns/call
# 18 times (10µs+0s) by Class::MOP::Mixin::meta at line 16 of Class/MOP/Mixin.pm, avg 578ns/call
# 10 times (9µs+0s) by MongoDB::Collection::DESTROY or MongoDB::Database::DESTROY or MongoDB::OID::DESTROY at line 5 of (eval 62)[Eval/Closure.pm:144], avg 870ns/call
# 10 times (5µs+0s) by MongoDB::Collection::new or MongoDB::Cursor::new or MongoDB::Database::new or MongoDB::MongoClient::new at line 11 of (eval 62)[Eval/Closure.pm:144], avg 510ns/call
# 9 times (7µs+0s) by MongoDB::Collection::new or MongoDB::Cursor::new or MongoDB::Database::new at line 41 of (eval 62)[Eval/Closure.pm:144], avg 767ns/call
# 5 times (3µs+0s) by Mentat::Storage::Mongo::_unbless at line 914 of Mentat/Storage/Mongo.pm, avg 680ns/call
# 5 times (3µs+0s) by Log::Core::Essentials::severity_as_str at line 217 of Log/Core/Essentials.pm, avg 520ns/call
# 3 times (3µs+0s) by Moose::Meta::Method::Destructor::is_needed at line 61 of Moose/Meta/Method/Destructor.pm, avg 933ns/call
# 3 times (2µs+0s) by Moose::Object::new at line 24 of Moose/Object.pm, avg 633ns/call
# 3 times (2µs+0s) by Mentat::Storage::Mongo::_unbless at line 904 of Mentat/Storage/Mongo.pm, avg 567ns/call
# 3 times (2µs+0s) by Mentat::Storage::Mongo::_encode2json at line 877 of Mentat/Storage/Mongo.pm, avg 533ns/call
# 2 times (2µs+0s) by MongoDB::Connection::get_database or MongoDB::Connection::query_timeout at line 94 of Moose/Meta/Method/Delegation.pm, avg 900ns/call
# 2 times (2µs+0s) by Moose::Meta::Attribute::_weaken_value at line 817 of Moose/Meta/Attribute.pm, avg 850ns/call
# 2 times (2µs+0s) by overload::AddrRef at line 98 of overload.pm, avg 800ns/call
# once (5µs+0s) by Mentat::Storage::Mongo::_convertor at line 799 of Mentat/Storage/Mongo.pm
# once (3µs+0s) by Mentat::Storage::Mongo::get_last_index at line 627 of Mentat/Storage/Mongo.pm
# once (2µs+0s) by Mentat::Storage::Mongo::DESTROY at line 214 of Mentat/Storage/Mongo.pm
# once (1µs+0s) by Mentat::Storage::Mongo::_set_last_index at line 826 of Mentat/Storage/Mongo.pm
# once (800ns+0s) by Eval::Closure::Sandbox_154::__ANON__[(eval 220)[/usr/local/share/perl/5.14.2/Eval/Closure.pm:144]:3] at line 3 of (eval 62)[Eval/Closure.pm:144]
# once (700ns+0s) by Mentat::Storage::Mongo::_init at line 745 of Mentat/Storage/Mongo.pm
# once (700ns+0s) by Mentat::Storage::Mongo::find_i at line 383 of Mentat/Storage/Mongo.pm
# once (600ns+0s) by Mentat::Storage::new at line 111 of Mentat/Storage.pm
# once (600ns+0s) by Mentat::Storage::Mongo::get_last_filter at line 606 of Mentat/Storage/Mongo.pm
# once (600ns+0s) by Mentat::Storage::Mongo::reconnect at line 573 of Mentat/Storage/Mongo.pm
# once (500ns+0s) by Mentat::Storage::Mongo::disconnect at line 546 of Mentat/Storage/Mongo.pm
# once (500ns+0s) by Sub::Install::_CODELIKE at line 23 of Sub/Install.pm
# once (400ns+0s) by Mentat::Storage::Mongo::_set_last_filter at line 847 of Mentat/Storage/Mongo.pm | |||||
# spent 90µs within Scalar::Util::isweak which was called 153 times, avg 589ns/call:
# 153 times (90µs+0s) by Class::MOP::metaclass_is_weak at line 58 of Class/MOP.pm, avg 589ns/call | |||||
# spent 9µs within Scalar::Util::refaddr which was called 12 times, avg 717ns/call:
# 10 times (5µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 74 of Class/MOP/Method/Inlined.pm, avg 550ns/call
# 2 times (3µs+0s) by overload::AddrRef at line 101 of overload.pm, avg 2µs/call | |||||
# spent 577µs within Scalar::Util::reftype which was called 944 times, avg 611ns/call:
# 241 times (134µs+0s) by Eval::Closure::_validate_env at line 80 of Eval/Closure.pm, avg 554ns/call
# 222 times (127µs+0s) by Class::MOP::Method::wrap at line 33 of Class/MOP/Method.pm, avg 574ns/call
# 199 times (113µs+0s) by Sub::Install::_CODELIKE at line 23 of Sub/Install.pm, avg 567ns/call
# 196 times (151µs+0s) by Eval::Closure::_canonicalize_source at line 56 of Eval/Closure.pm, avg 770ns/call
# 84 times (51µs+0s) by Class::MOP::Mixin::HasMethods::wrap_method_body at line 45 of Class/MOP/Mixin/HasMethods.pm, avg 602ns/call
# 2 times (2µs+0s) by overload::AddrRef at line 100 of overload.pm, avg 750ns/call | |||||
# spent 1.23ms within Scalar::Util::weaken which was called 1331 times, avg 925ns/call:
# 478 times (350µs+0s) by Class::MOP::Method::attach_to_class at line 77 of Class/MOP/Method.pm, avg 733ns/call
# 252 times (294µs+0s) by Class::MOP::Method::Accessor::new at line 40 of Class/MOP/Method/Accessor.pm, avg 1µs/call
# 181 times (181µs+0s) by Class::MOP::Attribute::attach_to_class at line 242 of Class/MOP/Attribute.pm, avg 1µs/call
# 176 times (178µs+0s) by Class::MOP::Method::wrap at line 48 of Class/MOP/Method.pm, avg 1µs/call
# 105 times (107µs+0s) by Class::MOP::Instance::new at line 47 of Class/MOP/Instance.pm, avg 1µs/call
# 36 times (30µs+0s) by Moose::Meta::Method::Delegation::new at line 50 of Moose/Meta/Method/Delegation.pm, avg 839ns/call
# 35 times (27µs+0s) by Class::MOP::Method::Meta::_generate_meta_method at line 29 of Class/MOP/Method/Meta.pm, avg 777ns/call
# 30 times (31µs+0s) by Class::MOP::Method::Constructor::new at line 35 of Class/MOP/Method/Constructor.pm, avg 1µs/call
# 28 times (21µs+0s) by Class::MOP::Method::clone at line 136 of Class/MOP/Method.pm, avg 736ns/call
# 5 times (6µs+0s) by Moose::Meta::Method::Constructor::new at line 46 of Moose/Meta/Method/Constructor.pm, avg 1µs/call
# 3 times (4µs+0s) by Moose::Meta::Method::Destructor::new at line 44 of Moose/Meta/Method/Destructor.pm, avg 1µs/call
# 2 times (2µs+0s) by Class::MOP::Instance::weaken_slot_value at line 163 of Class/MOP/Instance.pm, avg 1µs/call |