Filename | /Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/darwin-2level/Scalar/Util.pm |
Statements | Executed 16 statements in 237µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
184210 | 50 | 29 | 132ms | 132ms | blessed (xsub) | Scalar::Util::
819 | 19 | 10 | 774µs | 774µs | weaken (xsub) | Scalar::Util::
353 | 10 | 2 | 101µs | 101µs | refaddr (xsub) | Scalar::Util::
96 | 3 | 2 | 66µs | 66µs | reftype (xsub) | Scalar::Util::
1 | 1 | 1 | 22µs | 24µs | BEGIN@9 | Scalar::Util::
2 | 1 | 1 | 11µs | 20µs | set_prototype | Scalar::Util::
1 | 1 | 1 | 5µs | 29µs | BEGIN@10 | Scalar::Util::
1 | 1 | 1 | 2µs | 2µ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 | 21µ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 | 173µs | 2 | 53µs | # spent 29µs (5+24) within Scalar::Util::BEGIN@10 which was called:
# once (5µs+24µs) by Moo::_Utils::BEGIN@36 at line 10 # spent 29µs making 1 call to Scalar::Util::BEGIN@10
# spent 24µs making 1 call to warnings::import |
11 | 1 | 0s | require Exporter; | ||
12 | |||||
13 | 1 | 5µs | our @ISA = qw(Exporter); | ||
14 | 1 | 1µ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 | 1µs | require List::Util; # List::Util loads the XS | ||
24 | 1 | 10µs | 1 | 6µs | List::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863) # spent 6µ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 20µs (11+9) within Scalar::Util::set_prototype which was called 2 times, avg 10µs/call:
# 2 times (11µs+9µs) by Type::Tiny::BEGIN@21 at line 364 of Types/TypeTiny.pm, avg 10µs/call | ||||
39 | 2 | 1µs | my ( $code, $proto ) = @_; | ||
40 | 2 | 19µs | 2 | 9µs | return Sub::Util::set_prototype( $proto, $code ); # spent 9µs making 2 calls to Sub::Util::set_prototype, avg 4µs/call |
41 | } | ||||
42 | |||||
43 | 1 | 5µs | 1; | ||
44 | |||||
45 | __END__ | ||||
# spent 132ms within Scalar::Util::blessed which was called 184210 times, avg 717ns/call:
# 73713 times (66.2ms+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 897ns/call
# 58139 times (34.6ms+0s) by JSON::MaybeXS::is_bool at line 59 of JSON/MaybeXS.pm, avg 595ns/call
# 39138 times (20.5ms+0s) by Data::Perl::Role::Collection::Hash::kv at line 72 of Data/Perl/Role/Collection/Hash.pm, avg 525ns/call
# 4269 times (5.83ms+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
# 4217 times (2.37ms+0s) by JSON::Schema::Modern::Error::new at line 77 of (eval 435)[Sub/Quote.pm:3], avg 562ns/call
# 794 times (419µs+0s) by Type::Tiny::strictly_equals at line 687 of Type/Tiny.pm, avg 528ns/call
# 794 times (344µs+0s) by Type::Tiny::strictly_equals at line 688 of Type/Tiny.pm, avg 433ns/call
# 703 times (360µs+0s) by Type::Tiny::is_strictly_subtype_of at line 694 of Type/Tiny.pm, avg 512ns/call
# 703 times (335µs+0s) by Type::Tiny::is_strictly_subtype_of at line 695 of Type/Tiny.pm, avg 477ns/call
# 343 times (190µ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 554ns/call
# 295 times (175µs+0s) by Type::Library::meta at line 209 of Type/Library.pm, avg 593ns/call
# 191 times (101µs+0s) by Type::Tiny::is_strictly_a_type_of at line 712 of Type/Tiny.pm, avg 529ns/call
# 191 times (78µs+0s) by Type::Tiny::is_strictly_a_type_of at line 713 of Type/Tiny.pm, avg 408ns/call
# 88 times (87µs+0s) by Method::Generate::Accessor::_validate_codulatable at line 683 of Method/Generate/Accessor.pm, avg 989ns/call
# 83 times (64µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 771ns/call
# 68 times (67µ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 985ns/call
# 65 times (39µs+0s) by Data::Perl::Role::Collection::Hash::set at line 37 of Data/Perl/Role/Collection/Hash.pm, avg 600ns/call
# 63 times (57µs+0s) by Type::Tiny::new at line 255 of Type/Tiny.pm, avg 905ns/call
# 48 times (29µ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 604ns/call
# 37 times (27µs+0s) by Type::Library::add_type at line 215 of Type/Library.pm, avg 730ns/call
# 37 times (15µs+0s) by Method::Generate::Accessor::_generate_call_code at line 512 of Method/Generate/Accessor.pm, avg 405ns/call
# 37 times (6µs+0s) by Type::Library::add_type at line 222 of Type/Library.pm, avg 162ns/call
# 36 times (31µ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 861ns/call
# 29 times (27µs+0s) by Data::Perl::Role::Collection::Hash::values at line 64 of Data/Perl/Role/Collection/Hash.pm, avg 931ns/call
# 20 times (19µ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 950ns/call
# 14 times (20µs+0s) by JSON::Schema::Modern::Document::new at line 84 of (eval 428)[Sub/Quote.pm:3], avg 1µs/call
# 14 times (18µs+0s) by JSON::Schema::Modern::Document::_set_metaschema_uri at line 39 of (eval 270)[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
# 10 times (8µs+0s) by Type::Tiny::Class::new at line 41 of Type/Tiny/Class.pm, avg 800ns/call
# 10 times (4µs+0s) by JSON::Schema::Modern::Document::_set_canonical_uri at line 39 of (eval 268)[Sub/Quote.pm:3], avg 400ns/call
# 8 times (2µs+0s) by JSON::Schema::Modern::Document::canonical_uri at line 44 of (eval 267)[Sub/Quote.pm:3], avg 250ns/call
# 6 times (5µs+0s) by JSON::Schema::Modern::Document::new at line 74 of (eval 428)[Sub/Quote.pm:3], avg 833ns/call
# 4 times (5µs+0s) by Type::Coercion::add_type_coercions at line 240 of Type/Coercion.pm, avg 1µs/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::Library::add_coercion at line 274 of Type/Library.pm, avg 667ns/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 591 of Type/Tiny.pm, avg 667ns/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 269 of Type/Library.pm, avg 333ns/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 (4µs+0s) by YAML::PP::new at line 51 of YAML/PP.pm
# once (2µs+0s) by YAML::PP::Dumper::new at line 37 of YAML/PP/Dumper.pm
# once (1µs+0s) by OpenAPI::Modern::new at line 43 of (eval 419)[Sub/Quote.pm:3]
# 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 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::Document::OpenAPI::new at line 77 of (eval 421)[Sub/Quote.pm:3]
# once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 138 of (eval 421)[Sub/Quote.pm:3]
# 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 (0s+0s) by OpenAPI::Modern::new at line 48 of (eval 419)[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 2µs within Scalar::Util::openhandle which was called:
# once (2µs+0s) by YAML::PP::Reader::File::open_handle at line 52 of YAML/PP/Reader.pm | |||||
# spent 101µs within Scalar::Util::refaddr which was called 353 times, avg 286ns/call:
# 180 times (43µs+0s) by JSON::Schema::Modern::add_schema at line 169 of JSON/Schema/Modern.pm, avg 239ns/call
# 83 times (22µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 265ns/call
# 24 times (10µ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 417ns/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
# 12 times (7µs+0s) by JSON::Schema::Modern::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern.pm:676] at line 659 of JSON/Schema/Modern.pm, avg 583ns/call
# 6 times (4µ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 667ns/call
# 6 times (3µ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 500ns/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 615 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 606 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 646 of Type/Tiny.pm, avg 167ns/call | |||||
# spent 66µs within Scalar::Util::reftype which was called 96 times, avg 688ns/call:
# 83 times (60µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 723ns/call
# 9 times (1µs+0s) by Type::Tiny::new at line 364 of Type/Tiny.pm, avg 111ns/call
# 4 times (5µs+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm, avg 1µs/call | |||||
# spent 774µs within Scalar::Util::weaken which was called 819 times, avg 945ns/call:
# 133 times (141µs+0s) by Sub::Quote::quote_sub at line 218 of Sub/Quote.pm, avg 1µs/call
# 119 times (123µs+0s) by Moo::_Utils::_install_tracked at line 100 of Moo/_Utils.pm, avg 1µs/call
# 112 times (144µs+0s) by Sub::Quote::unquote_sub at line 362 of Sub/Quote.pm, avg 1µs/call
# 82 times (64µs+0s) by Type::Tiny::new at line 331 of Type/Tiny.pm, avg 780ns/call
# 82 times (50µs+0s) by Type::Tiny::new at line 334 of Type/Tiny.pm, avg 610ns/call
# 58 times (60µs+0s) by Type::Coercion::new at line 63 of Type/Coercion.pm, avg 1µs/call
# 37 times (44µs+0s) by Sub::Defer::defer_sub at line 182 of Sub/Defer.pm, avg 1µs/call
# 37 times (24µs+0s) by Sub::Defer::defer_sub at line 183 of Sub/Defer.pm, avg 649ns/call
# 34 times (18µs+0s) by Type::Tiny::parameterize at line 1079 of Type/Tiny.pm, avg 529ns/call
# 27 times (24µs+0s) by Sub::Quote::quote_sub at line 238 of Sub/Quote.pm, avg 889ns/call
# 27 times (12µs+0s) by Sub::Quote::quote_sub at line 239 of Sub/Quote.pm, avg 444ns/call
# 21 times (11µs+0s) by Moo::_Utils::_install_modifier at line 91 of Moo/_Utils.pm, avg 524ns/call
# 14 times (18µs+0s) by JSON::Schema::Modern::Document::new at line 83 of (eval 428)[Sub/Quote.pm:3], avg 1µs/call
# 13 times (11µs+0s) by Sub::Defer::undefer_sub at line 97 of Sub/Defer.pm, avg 846ns/call
# 10 times (10µs+0s) by Method::Generate::Constructor::install_delayed at line 103 of Method/Generate/Constructor.pm, avg 1µs/call
# 7 times (6µ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 857ns/call
# 4 times (12µs+0s) by Type::Tiny::Enum::_build_compiled_check at line 199 of Type/Tiny/Enum.pm, avg 3µs/call
# once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 86 of (eval 421)[Sub/Quote.pm:3]
# once (1µs+0s) by JSON::Schema::Modern::BEGIN@31 at line 257 of Types/Standard.pm |