Filename | /Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/darwin-2level/Scalar/Util.pm |
Statements | Executed 16 statements in 231µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
184383 | 50 | 29 | 110ms | 110ms | blessed (xsub) | Scalar::Util::
819 | 19 | 10 | 532µs | 532µs | weaken (xsub) | Scalar::Util::
353 | 10 | 2 | 97µs | 97µs | refaddr (xsub) | Scalar::Util::
96 | 3 | 2 | 41µs | 41µs | reftype (xsub) | Scalar::Util::
1 | 1 | 1 | 22µs | 24µs | BEGIN@9 | Scalar::Util::
2 | 1 | 1 | 11µs | 18µs | set_prototype | Scalar::Util::
1 | 1 | 1 | 6µs | 26µs | BEGIN@10 | Scalar::Util::
1 | 1 | 1 | 1µs | 1µs | openhandle (xsub) | 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 | 24µs | 2 | 26µs | # spent 24µs (22+2) within Scalar::Util::BEGIN@9 which was called:
# once (22µs+2µs) by Moo::_Utils::BEGIN@36 at line 9 # spent 24µs making 1 call to Scalar::Util::BEGIN@9
# spent 2µs making 1 call to strict::import |
10 | 2 | 166µs | 2 | 46µs | # spent 26µs (6+20) within Scalar::Util::BEGIN@10 which was called:
# once (6µs+20µs) by Moo::_Utils::BEGIN@36 at line 10 # spent 26µs making 1 call to Scalar::Util::BEGIN@10
# spent 20µs making 1 call to warnings::import |
11 | 1 | 0s | require Exporter; | ||
12 | |||||
13 | 1 | 6µ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 | ||||
18 | tainted | ||||
19 | ); | ||||
20 | 1 | 0s | our $VERSION = "1.62"; | ||
21 | 1 | 1µs | $VERSION =~ tr/_//d; | ||
22 | |||||
23 | 1 | 0s | require List::Util; # List::Util loads the XS | ||
24 | 1 | 10µs | 1 | 5µs | List::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863) # spent 5µs making 1 call to UNIVERSAL::VERSION |
25 | |||||
26 | # populating @EXPORT_FAIL is done in the XS code | ||||
27 | sub export_fail { | ||||
28 | if (grep { /^isvstring$/ } @_ ) { | ||||
29 | require Carp; | ||||
30 | Carp::croak("Vstrings are not implemented in this version of perl"); | ||||
31 | } | ||||
32 | |||||
33 | @_; | ||||
34 | } | ||||
35 | |||||
36 | # set_prototype has been moved to Sub::Util with a different interface | ||||
37 | sub set_prototype(&$) | ||||
38 | # spent 18µs (11+7) within Scalar::Util::set_prototype which was called 2 times, avg 9µs/call:
# 2 times (11µs+7µs) by Type::Tiny::BEGIN@21 at line 364 of Types/TypeTiny.pm, avg 9µs/call | ||||
39 | 2 | 0s | my ( $code, $proto ) = @_; | ||
40 | 2 | 18µs | 2 | 7µs | return Sub::Util::set_prototype( $proto, $code ); # spent 7µs making 2 calls to Sub::Util::set_prototype, avg 4µs/call |
41 | } | ||||
42 | |||||
43 | 1 | 4µs | 1; | ||
44 | |||||
45 | __END__ | ||||
# spent 110ms within Scalar::Util::blessed which was called 184383 times, avg 599ns/call:
# 75138 times (57.0ms+0s) by Data::Perl::Collection::Hash::MooseLike::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Data/Perl/Collection/Hash/MooseLike.pm:22] at line 17 of Data/Perl/Collection/Hash/MooseLike.pm, avg 759ns/call
# 57269 times (29.0ms+0s) by JSON::MaybeXS::is_bool at line 59 of JSON/MaybeXS.pm, avg 507ns/call
# 38798 times (16.2ms+0s) by Data::Perl::Role::Collection::Hash::kv at line 72 of Data/Perl/Role/Collection/Hash.pm, avg 417ns/call
# 4248 times (4.53ms+0s) by Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:19] at line 17 of Safe/Isa.pm, avg 1µs/call
# 4196 times (1.93ms+0s) by JSON::Schema::Modern::Error::new at line 77 of (eval 435)[Sub/Quote.pm:3], avg 461ns/call
# 794 times (288µs+0s) by Type::Tiny::strictly_equals at line 687 of Type/Tiny.pm, avg 363ns/call
# 794 times (228µs+0s) by Type::Tiny::strictly_equals at line 688 of Type/Tiny.pm, avg 287ns/call
# 703 times (252µs+0s) by Type::Tiny::is_strictly_subtype_of at line 694 of Type/Tiny.pm, avg 358ns/call
# 703 times (224µs+0s) by Type::Tiny::is_strictly_subtype_of at line 695 of Type/Tiny.pm, avg 319ns/call
# 343 times (140µs+0s) by Eval::TypeTiny::Sandbox::__ANON__[(eval 57)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Eval/TypeTiny.pm:8]:3] at line 3 of (eval 57)[Eval/TypeTiny.pm:8], avg 408ns/call
# 295 times (120µs+0s) by Type::Library::meta at line 209 of Type/Library.pm, avg 407ns/call
# 191 times (74µs+0s) by Type::Tiny::is_strictly_a_type_of at line 712 of Type/Tiny.pm, avg 387ns/call
# 191 times (61µs+0s) by Type::Tiny::is_strictly_a_type_of at line 713 of Type/Tiny.pm, avg 319ns/call
# 88 times (56µs+0s) by Method::Generate::Accessor::_validate_codulatable at line 683 of Method/Generate/Accessor.pm, avg 636ns/call
# 83 times (35µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 422ns/call
# 68 times (36µs+0s) by MooX::TypeTiny::Role::GenerateAccessor::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/MooX/TypeTiny/Role/GenerateAccessor.pm:33] at line 13 of MooX/TypeTiny/Role/GenerateAccessor.pm, avg 529ns/call
# 65 times (32µs+0s) by Data::Perl::Role::Collection::Hash::set at line 37 of Data/Perl/Role/Collection/Hash.pm, avg 492ns/call
# 63 times (32µs+0s) by Type::Tiny::new at line 255 of Type/Tiny.pm, avg 508ns/call
# 48 times (35µs+0s) by Type::Tiny::__ANON__[(eval 434)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm:3]:16] at line 16 of (eval 434)[Sub/Quote.pm:3], avg 729ns/call
# 37 times (14µs+0s) by Type::Library::add_type at line 215 of Type/Library.pm, avg 378ns/call
# 37 times (10µs+0s) by Method::Generate::Accessor::_generate_call_code at line 512 of Method/Generate/Accessor.pm, avg 270ns/call
# 37 times (5µs+0s) by Type::Library::add_type at line 222 of Type/Library.pm, avg 135ns/call
# 36 times (28µs+0s) by Type::Tiny::__ANON__[(eval 432)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm:3]:16] at line 16 of (eval 432)[Sub/Quote.pm:3], avg 778ns/call
# 29 times (39µs+0s) by Data::Perl::Role::Collection::Hash::values at line 64 of Data/Perl/Role/Collection/Hash.pm, avg 1µs/call
# 20 times (15µs+0s) by MooX::TypeTiny::Role::GenerateAccessor::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/MooX/TypeTiny/Role/GenerateAccessor.pm:63] at line 42 of MooX/TypeTiny/Role/GenerateAccessor.pm, avg 750ns/call
# 14 times (14µs+0s) by JSON::Schema::Modern::Document::new at line 84 of (eval 428)[Sub/Quote.pm:3], avg 1µs/call
# 14 times (9µs+0s) by JSON::Schema::Modern::Document::_assert__path_to_resource at line 24 of (eval 303)[Sub/Quote.pm:3], avg 643ns/call
# 14 times (9µs+0s) by JSON::Schema::Modern::Document::_set_metaschema_uri at line 39 of (eval 270)[Sub/Quote.pm:3], avg 643ns/call
# 10 times (3µs+0s) by Type::Tiny::Class::new at line 41 of Type/Tiny/Class.pm, avg 300ns/call
# 10 times (2µs+0s) by JSON::Schema::Modern::Document::_set_canonical_uri at line 39 of (eval 268)[Sub/Quote.pm:3], avg 200ns/call
# 8 times (4µs+0s) by JSON::Schema::Modern::Document::canonical_uri at line 44 of (eval 267)[Sub/Quote.pm:3], avg 500ns/call
# 6 times (1µs+0s) by JSON::Schema::Modern::Document::new at line 74 of (eval 428)[Sub/Quote.pm:3], avg 167ns/call
# 4 times (3µs+0s) by Type::Coercion::add_type_coercions at line 240 of Type/Coercion.pm, avg 750ns/call
# 4 times (2µs+0s) by Types::Standard::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Types/Standard.pm:1059] at line 1044 of Types/Standard.pm, avg 500ns/call
# 3 times (2µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:602] at line 590 of Type/Tiny.pm, avg 667ns/call
# 3 times (1µs+0s) by Type::Library::add_coercion at line 274 of Type/Library.pm, avg 333ns/call
# 3 times (0s+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:602] at line 591 of Type/Tiny.pm, avg 0s/call
# 3 times (0s+0s) by Type::Library::add_coercion at line 269 of Type/Library.pm, avg 0s/call
# 2 times (2µs+0s) by Type::Tiny::Union::new_by_overload at line 30 of Type/Tiny/Union.pm, avg 1µs/call
# once (2µs+0s) by YAML::PP::Dumper::new at line 37 of YAML/PP/Dumper.pm
# once (2µs+0s) by YAML::PP::new at line 51 of YAML/PP.pm
# once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::_set_json_schema_dialect at line 39 of (eval 394)[Sub/Quote.pm:3]
# once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 77 of (eval 421)[Sub/Quote.pm:3]
# once (1µs+0s) by JSON::Schema::Modern::_json_decoder at line 24 of (eval 366)[Sub/Quote.pm:3]
# once (1µs+0s) by YAML::PP::Schema::load_subschemas at line 108 of YAML/PP/Schema.pm
# once (1µs+0s) by JSON::Schema::Modern::Result::new at line 163 of (eval 436)[Sub/Quote.pm:3]
# once (1µs+0s) by OpenAPI::Modern::new at line 48 of (eval 419)[Sub/Quote.pm:3]
# once (1µs+0s) by OpenAPI::Modern::new at line 43 of (eval 419)[Sub/Quote.pm:3]
# once (0s+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 138 of (eval 421)[Sub/Quote.pm:3]
# once (0s+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 87 of (eval 421)[Sub/Quote.pm:3] | |||||
# spent 1µs within Scalar::Util::openhandle which was called:
# once (1µs+0s) by YAML::PP::Reader::File::open_handle at line 52 of YAML/PP/Reader.pm | |||||
# spent 97µs within Scalar::Util::refaddr which was called 353 times, avg 275ns/call:
# 180 times (46µs+0s) by JSON::Schema::Modern::add_schema at line 169 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern.pm, avg 256ns/call
# 83 times (25µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 301ns/call
# 24 times (7µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 632 of Type/Tiny.pm, avg 292ns/call
# 24 times (1µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 630 of Type/Tiny.pm, avg 42ns/call
# 12 times (11µs+0s) by JSON::Schema::Modern::__ANON__[/Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern.pm:685] at line 668 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern.pm, avg 917ns/call
# 6 times (2µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 606 of Type/Tiny.pm, avg 333ns/call
# 6 times (2µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 617 of Type/Tiny.pm, avg 333ns/call
# 6 times (1µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 609 of Type/Tiny.pm, avg 167ns/call
# 6 times (1µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 646 of Type/Tiny.pm, avg 167ns/call
# 6 times (1µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 615 of Type/Tiny.pm, avg 167ns/call | |||||
# spent 41µs within Scalar::Util::reftype which was called 96 times, avg 427ns/call:
# 83 times (35µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 422ns/call
# 9 times (2µs+0s) by Type::Tiny::new at line 364 of Type/Tiny.pm, avg 222ns/call
# 4 times (4µs+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm, avg 1µs/call | |||||
# spent 532µs within Scalar::Util::weaken which was called 819 times, avg 650ns/call:
# 133 times (101µs+0s) by Sub::Quote::quote_sub at line 218 of Sub/Quote.pm, avg 759ns/call
# 119 times (80µs+0s) by Moo::_Utils::_install_tracked at line 100 of Moo/_Utils.pm, avg 672ns/call
# 112 times (100µs+0s) by Sub::Quote::unquote_sub at line 362 of Sub/Quote.pm, avg 893ns/call
# 82 times (43µs+0s) by Type::Tiny::new at line 334 of Type/Tiny.pm, avg 524ns/call
# 82 times (43µs+0s) by Type::Tiny::new at line 331 of Type/Tiny.pm, avg 524ns/call
# 58 times (37µs+0s) by Type::Coercion::new at line 63 of Type/Coercion.pm, avg 638ns/call
# 37 times (28µs+0s) by Sub::Defer::defer_sub at line 182 of Sub/Defer.pm, avg 757ns/call
# 37 times (9µs+0s) by Sub::Defer::defer_sub at line 183 of Sub/Defer.pm, avg 243ns/call
# 34 times (13µs+0s) by Type::Tiny::parameterize at line 1079 of Type/Tiny.pm, avg 382ns/call
# 27 times (12µs+0s) by Sub::Quote::quote_sub at line 238 of Sub/Quote.pm, avg 444ns/call
# 27 times (9µs+0s) by Sub::Quote::quote_sub at line 239 of Sub/Quote.pm, avg 333ns/call
# 21 times (12µs+0s) by Moo::_Utils::_install_modifier at line 91 of Moo/_Utils.pm, avg 571ns/call
# 14 times (16µs+0s) by JSON::Schema::Modern::Document::new at line 83 of (eval 428)[Sub/Quote.pm:3], avg 1µs/call
# 13 times (13µs+0s) by Sub::Defer::undefer_sub at line 97 of Sub/Defer.pm, avg 1µs/call
# 10 times (6µs+0s) by Method::Generate::Constructor::install_delayed at line 103 of Method/Generate/Constructor.pm, avg 600ns/call
# 7 times (7µs+0s) by Method::Generate::Constructor::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Method/Generate/Constructor.pm:101] at line 99 of Method/Generate/Constructor.pm, avg 1µs/call
# 4 times (2µs+0s) by Type::Tiny::Enum::_build_compiled_check at line 199 of Type/Tiny/Enum.pm, avg 500ns/call
# once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 86 of (eval 421)[Sub/Quote.pm:3]
# once (0s+0s) by JSON::Schema::Modern::BEGIN@31 at line 257 of Types/Standard.pm |