Filename | /Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/darwin-2level/Scalar/Util.pm |
Statements | Executed 16 statements in 316µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
330503 | 51 | 30 | 212ms | 212ms | blessed (xsub) | Scalar::Util::
823 | 19 | 10 | 724µs | 724µs | weaken (xsub) | Scalar::Util::
353 | 10 | 2 | 101µs | 101µs | refaddr (xsub) | Scalar::Util::
96 | 3 | 2 | 60µs | 60µs | reftype (xsub) | Scalar::Util::
1 | 1 | 1 | 29µs | 31µs | BEGIN@9 | Scalar::Util::
2 | 1 | 1 | 12µs | 23µs | set_prototype | Scalar::Util::
1 | 1 | 1 | 7µs | 33µ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 | 33µs | 2 | 33µs | # spent 31µs (29+2) within Scalar::Util::BEGIN@9 which was called:
# once (29µs+2µs) by Moo::_Utils::BEGIN@36 at line 9 # spent 31µs making 1 call to Scalar::Util::BEGIN@9
# spent 2µs making 1 call to strict::import |
10 | 2 | 225µs | 2 | 59µs | # spent 33µs (7+26) within Scalar::Util::BEGIN@10 which was called:
# once (7µs+26µs) by Moo::_Utils::BEGIN@36 at line 10 # spent 33µs making 1 call to Scalar::Util::BEGIN@10
# spent 26µs making 1 call to warnings::import |
11 | 1 | 1µs | require Exporter; | ||
12 | |||||
13 | 1 | 7µ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 | 14µs | 1 | 8µs | List::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863) # spent 8µ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 23µs (12+11) within Scalar::Util::set_prototype which was called 2 times, avg 12µs/call:
# 2 times (12µs+11µs) by Type::Tiny::BEGIN@21 at line 364 of Types/TypeTiny.pm, avg 12µs/call | ||||
39 | 2 | 1µs | my ( $code, $proto ) = @_; | ||
40 | 2 | 26µs | 2 | 11µs | return Sub::Util::set_prototype( $proto, $code ); # spent 11µs making 2 calls to Sub::Util::set_prototype, avg 6µs/call |
41 | } | ||||
42 | |||||
43 | 1 | 6µs | 1; | ||
44 | |||||
45 | __END__ | ||||
# spent 212ms within Scalar::Util::blessed which was called 330503 times, avg 641ns/call:
# 76306 times (72.2ms+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 946ns/call
# 75880 times (54.9ms+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 724ns/call
# 72037 times (32.5ms+0s) by JSON::Schema::Modern::Annotation::new at line 74 of (eval 431)[Sub/Quote.pm:3], avg 451ns/call
# 58197 times (29.2ms+0s) by JSON::MaybeXS::is_bool at line 59 of JSON/MaybeXS.pm, avg 502ns/call
# 39138 times (18.5ms+0s) by Data::Perl::Role::Collection::Hash::kv at line 72 of Data/Perl/Role/Collection/Hash.pm, avg 473ns/call
# 4217 times (2.07ms+0s) by JSON::Schema::Modern::Error::new at line 77 of (eval 432)[Sub/Quote.pm:3], avg 492ns/call
# 794 times (361µs+0s) by Type::Tiny::strictly_equals at line 687 of Type/Tiny.pm, avg 455ns/call
# 794 times (356µs+0s) by Type::Tiny::strictly_equals at line 688 of Type/Tiny.pm, avg 448ns/call
# 703 times (338µs+0s) by Type::Tiny::is_strictly_subtype_of at line 694 of Type/Tiny.pm, avg 481ns/call
# 703 times (306µs+0s) by Type::Tiny::is_strictly_subtype_of at line 695 of Type/Tiny.pm, avg 435ns/call
# 341 times (207µ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 607ns/call
# 294 times (196µs+0s) by Type::Library::meta at line 209 of Type/Library.pm, avg 667ns/call
# 191 times (116µs+0s) by Type::Tiny::is_strictly_a_type_of at line 712 of Type/Tiny.pm, avg 607ns/call
# 191 times (88µs+0s) by Type::Tiny::is_strictly_a_type_of at line 713 of Type/Tiny.pm, avg 461ns/call
# 86 times (92µs+0s) by Method::Generate::Accessor::_validate_codulatable at line 683 of Method/Generate/Accessor.pm, avg 1µs/call
# 83 times (61µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 735ns/call
# 73 times (97µ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 1µs/call
# 65 times (27µs+0s) by Data::Perl::Role::Collection::Hash::set at line 37 of Data/Perl/Role/Collection/Hash.pm, avg 415ns/call
# 63 times (54µs+0s) by Type::Tiny::new at line 255 of Type/Tiny.pm, avg 857ns/call
# 48 times (27µs+0s) by Type::Tiny::__ANON__[(eval 430)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm:3]:16] at line 16 of (eval 430)[Sub/Quote.pm:3], avg 562ns/call
# 37 times (24µs+0s) by Type::Library::add_type at line 215 of Type/Library.pm, avg 649ns/call
# 37 times (15µs+0s) by Type::Library::add_type at line 222 of Type/Library.pm, avg 405ns/call
# 36 times (33µs+0s) by Type::Tiny::__ANON__[(eval 428)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm:3]:16] at line 16 of (eval 428)[Sub/Quote.pm:3], avg 917ns/call
# 34 times (15µs+0s) by Method::Generate::Accessor::_generate_call_code at line 512 of Method/Generate/Accessor.pm, avg 441ns/call
# 29 times (16µs+0s) by Data::Perl::Role::Collection::Hash::values at line 64 of Data/Perl/Role/Collection/Hash.pm, avg 552ns/call
# 17 times (12µ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 706ns/call
# 14 times (17µs+0s) by JSON::Schema::Modern::Document::new at line 84 of (eval 424)[Sub/Quote.pm:3], avg 1µs/call
# 14 times (11µs+0s) by JSON::Schema::Modern::Document::_set_metaschema_uri at line 39 of (eval 266)[Sub/Quote.pm:3], avg 786ns/call
# 14 times (11µs+0s) by JSON::Schema::Modern::Document::_assert__path_to_resource at line 24 of (eval 299)[Sub/Quote.pm:3], avg 786ns/call
# 10 times (5µs+0s) by Type::Tiny::Class::new at line 41 of Type/Tiny/Class.pm, avg 500ns/call
# 10 times (5µs+0s) by JSON::Schema::Modern::Document::_set_canonical_uri at line 39 of (eval 264)[Sub/Quote.pm:3], avg 500ns/call
# 8 times (7µs+0s) by JSON::Schema::Modern::Document::canonical_uri at line 44 of (eval 263)[Sub/Quote.pm:3], avg 875ns/call
# 6 times (4µs+0s) by JSON::Schema::Modern::Document::new at line 74 of (eval 424)[Sub/Quote.pm:3], avg 667ns/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
# 4 times (2µs+0s) by Type::Coercion::add_type_coercions at line 240 of Type/Coercion.pm, avg 500ns/call
# 3 times (2µs+0s) by Type::Library::add_coercion at line 269 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 (0s+0s) by Type::Library::add_coercion at line 274 of Type/Library.pm, avg 0s/call
# 2 times (3µs+0s) by Type::Tiny::Union::new_by_overload at line 30 of Type/Tiny/Union.pm, avg 2µs/call
# once (6µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 77 of (eval 417)[Sub/Quote.pm:3]
# once (2µs+0s) by JSON::Schema::Modern::Document::OpenAPI::_set_json_schema_dialect at line 39 of (eval 390)[Sub/Quote.pm:3]
# once (2µs+0s) by YAML::PP::Dumper::new at line 37 of YAML/PP/Dumper.pm
# once (1µs+0s) by JSON::Schema::Modern::Result::new at line 123 of (eval 433)[Sub/Quote.pm:3]
# once (1µs+0s) by OpenAPI::Modern::new at line 48 of (eval 415)[Sub/Quote.pm:3]
# once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 87 of (eval 417)[Sub/Quote.pm:3]
# once (1µs+0s) by YAML::PP::new at line 51 of YAML/PP.pm
# once (0s+0s) by YAML::PP::Schema::load_subschemas at line 108 of YAML/PP/Schema.pm
# once (0s+0s) by JSON::Schema::Modern::_json_decoder at line 24 of (eval 362)[Sub/Quote.pm:3]
# once (0s+0s) by OpenAPI::Modern::new at line 43 of (eval 415)[Sub/Quote.pm:3]
# once (0s+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 138 of (eval 417)[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 101µs within Scalar::Util::refaddr which was called 353 times, avg 286ns/call:
# 180 times (30µs+0s) by JSON::Schema::Modern::add_schema at line 169 of JSON/Schema/Modern.pm, avg 167ns/call
# 83 times (34µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 410ns/call
# 24 times (8µ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 333ns/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 630 of Type/Tiny.pm, avg 292ns/call
# 12 times (8µs+0s) by JSON::Schema::Modern::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern.pm:646] at line 629 of JSON/Schema/Modern.pm, avg 667ns/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 615 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 606 of Type/Tiny.pm, avg 500ns/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 646 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 | |||||
# spent 60µs within Scalar::Util::reftype which was called 96 times, avg 625ns/call:
# 83 times (55µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 663ns/call
# 9 times (3µs+0s) by Type::Tiny::new at line 364 of Type/Tiny.pm, avg 333ns/call
# 4 times (2µs+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm, avg 500ns/call | |||||
# spent 724µs within Scalar::Util::weaken which was called 823 times, avg 880ns/call:
# 134 times (154µs+0s) by Sub::Quote::quote_sub at line 218 of Sub/Quote.pm, avg 1µs/call
# 119 times (89µs+0s) by Moo::_Utils::_install_tracked at line 100 of Moo/_Utils.pm, avg 748ns/call
# 113 times (160µs+0s) by Sub::Quote::unquote_sub at line 362 of Sub/Quote.pm, avg 1µs/call
# 82 times (67µs+0s) by Type::Tiny::new at line 331 of Type/Tiny.pm, avg 817ns/call
# 82 times (58µs+0s) by Type::Tiny::new at line 334 of Type/Tiny.pm, avg 707ns/call
# 58 times (35µs+0s) by Type::Coercion::new at line 63 of Type/Coercion.pm, avg 603ns/call
# 37 times (31µs+0s) by Sub::Defer::defer_sub at line 182 of Sub/Defer.pm, avg 838ns/call
# 37 times (22µs+0s) by Sub::Defer::defer_sub at line 183 of Sub/Defer.pm, avg 595ns/call
# 34 times (13µs+0s) by Type::Tiny::parameterize at line 1079 of Type/Tiny.pm, avg 382ns/call
# 27 times (14µs+0s) by Sub::Quote::quote_sub at line 238 of Sub/Quote.pm, avg 519ns/call
# 27 times (11µs+0s) by Sub::Quote::quote_sub at line 239 of Sub/Quote.pm, avg 407ns/call
# 21 times (20µs+0s) by Moo::_Utils::_install_modifier at line 91 of Moo/_Utils.pm, avg 952ns/call
# 14 times (19µs+0s) by JSON::Schema::Modern::Document::new at line 83 of (eval 424)[Sub/Quote.pm:3], avg 1µs/call
# 14 times (8µs+0s) by Sub::Defer::undefer_sub at line 97 of Sub/Defer.pm, avg 571ns/call
# 10 times (9µs+0s) by Method::Generate::Constructor::install_delayed at line 103 of Method/Generate/Constructor.pm, avg 900ns/call
# 8 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 875ns/call
# 4 times (5µs+0s) by Type::Tiny::Enum::_build_compiled_check at line 199 of Type/Tiny/Enum.pm, avg 1µs/call
# once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 86 of (eval 417)[Sub/Quote.pm:3]
# once (1µs+0s) by JSON::Schema::Modern::BEGIN@31 at line 257 of Types/Standard.pm |