Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/5.22.0/Exporter.pm |
Statements | Executed 4231 statements in 9.67ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
278 | 239 | 138 | 8.33ms | 16.0ms | import | Exporter::
35 | 3 | 1 | 1.13ms | 1.24ms | as_heavy | Exporter::
1315 | 2 | 1 | 302µs | 302µs | CORE:match (opcode) | Exporter::
1818 | 2 | 1 | 175µs | 175µs | CORE:subst (opcode) | Exporter::
26 | 3 | 3 | 66µs | 1.20ms | export | Exporter::
7 | 7 | 7 | 22µs | 86µs | export_ok_tags | Exporter::
2 | 1 | 1 | 12µs | 50µs | export_to_level | Exporter::
0 | 0 | 0 | 0s | 0s | __ANON__[:64] | Exporter::
0 | 0 | 0 | 0s | 0s | export_fail | Exporter::
0 | 0 | 0 | 0s | 0s | export_tags | Exporter::
0 | 0 | 0 | 0s | 0s | require_version | Exporter::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Exporter; | ||||
2 | |||||
3 | 1 | 7µs | require 5.006; | ||
4 | |||||
5 | # Be lean. | ||||
6 | #use strict; | ||||
7 | #no strict 'refs'; | ||||
8 | |||||
9 | 1 | 200ns | our $Debug = 0; | ||
10 | 1 | 100ns | our $ExportLevel = 0; | ||
11 | 1 | 200ns | our $Verbose ||= 0; | ||
12 | 1 | 200ns | our $VERSION = '5.72'; | ||
13 | our (%Cache); | ||||
14 | |||||
15 | # spent 1.24ms (1.13+110µs) within Exporter::as_heavy which was called 35 times, avg 35µs/call:
# 26 times (1.05ms+84µs) by Exporter::export at line 25, avg 44µs/call
# 7 times (47µs+16µs) by Exporter::export_ok_tags at line 89, avg 9µs/call
# 2 times (29µs+9µs) by Exporter::export_to_level at line 81, avg 19µs/call | ||||
16 | 35 | 64µs | require Exporter::Heavy; | ||
17 | # Unfortunately, this does not work if the caller is aliased as *name = \&foo | ||||
18 | # Thus the need to create a lot of identical subroutines | ||||
19 | 35 | 66µs | my $c = (caller(1))[3]; | ||
20 | 35 | 136µs | 35 | 78µs | $c =~ s/.*:://; # spent 78µs making 35 calls to Exporter::CORE:subst, avg 2µs/call |
21 | 35 | 88µs | \&{"Exporter::Heavy::heavy_$c"}; | ||
22 | } | ||||
23 | |||||
24 | # spent 1.20ms (66µs+1.13) within Exporter::export which was called 26 times, avg 46µs/call:
# 21 times (50µs+1.08ms) by Exporter::import at line 62, avg 54µs/call
# 3 times (10µs+30µs) by IO::Socket::import at line 37 of IO/Socket.pm, avg 14µs/call
# 2 times (6µs+24µs) by Exporter::Heavy::heavy_export_to_level at line 219 of Exporter/Heavy.pm, avg 15µs/call | ||||
25 | 26 | 96µs | 52 | 12.8ms | goto &{as_heavy()}; # spent 11.6ms making 26 calls to Exporter::Heavy::heavy_export, avg 447µs/call
# spent 1.13ms making 26 calls to Exporter::as_heavy, avg 44µs/call |
26 | } | ||||
27 | |||||
28 | # spent 16.0ms (8.33+7.64) within Exporter::import which was called 278 times, avg 57µs/call:
# 23 times (179µs+5.62ms) by B::Deparse::BEGIN@55 at line 66 of B/Deparse.pm, avg 252µs/call
# 16 times (317µs+20µs) by CHI::Stats::BEGIN@4 or Class::MOP::Class::BEGIN@18 or Moose::Meta::Attribute::BEGIN@8 or Moose::Meta::Class::BEGIN@9 or Moose::Meta::Role::Application::BEGIN@9 or Moose::Meta::Role::Application::RoleSummation::BEGIN@8 or Moose::Meta::Role::Application::ToClass::BEGIN@8 or Moose::Meta::Role::Application::ToInstance::BEGIN@9 or Moose::Meta::Role::Attribute::BEGIN@7 or Moose::Meta::TypeConstraint::DuckType::BEGIN@10 or Moose::Meta::TypeConstraint::Union::BEGIN@10 or Moose::Util::BEGIN@12 or Moose::Util::MetaRole::BEGIN@8 or Package::DeprecationManager::BEGIN@9 or Search::Elasticsearch::Role::Cxn::BEGIN@5 or Search::Elasticsearch::Role::CxnPool::BEGIN@5 at line 35 of List/Util.pm, avg 21µs/call
# 3 times (60µs+4µs) by Class::MOP::Package::BEGIN@8 or Moo::sification::BEGIN@5 or namespace::clean::BEGIN@11 at line 38 of Sub/Exporter/Progressive.pm, avg 21µs/call
# once (553µs+54µs) by B::Deparse::BEGIN@12 at line 12 of B/Deparse.pm
# once (558µs+5µs) by POSIX::import at line 30 of POSIX.pm
# once (462µs+18µs) by IO::Socket::INET::BEGIN@12 at line 12 of IO/Socket/INET.pm
# once (447µs+20µs) by IO::Socket::BEGIN@13 at line 13 of IO/Socket.pm
# once (103µs+259µs) by DBD::mysql::dr::BEGIN@118 at line 118 of DBD/mysql.pm
# once (133µs+201µs) by CHI::Util::BEGIN@7 at line 7 of CHI/Util.pm
# once (53µs+162µs) by IO::Compress::Adapter::Deflate::BEGIN@8 at line 8 of IO/Compress/Adapter/Deflate.pm
# once (11µs+171µs) by DBD::mysql::db::BEGIN@205 at line 205 of DBD/mysql.pm
# once (33µs+102µs) by File::Glob::import at line 46 of File/Glob.pm
# once (28µs+103µs) by IO::Compress::Zlib::Extra::BEGIN@13 at line 13 of IO/Compress/Zlib/Extra.pm
# once (125µs+2µs) by HTTP::Tiny::Handle::BEGIN@865 at line 865 of HTTP/Tiny.pm
# once (24µs+90µs) by IO::Compress::Gzip::BEGIN@15 at line 15 of IO/Compress/Gzip.pm
# once (103µs+5µs) by IO::Compress::Gzip::BEGIN@12 at line 12 of IO/Compress/Gzip.pm
# once (24µs+83µs) by IO::Uncompress::Gunzip::BEGIN@16 at line 16 of IO/Uncompress/Gunzip.pm
# once (97µs+5µs) by POSIX::BEGIN@11 at line 11 of POSIX.pm
# once (38µs+60µs) by IO::Compress::RawDeflate::BEGIN@10 at line 10 of IO/Compress/RawDeflate.pm
# once (91µs+5µs) by IO::Uncompress::RawInflate::BEGIN@8 at line 8 of IO/Uncompress/RawInflate.pm
# once (87µs+5µs) by IO::Compress::RawDeflate::BEGIN@11 at line 11 of IO/Compress/RawDeflate.pm
# once (86µs+4µs) by IO::Compress::Deflate::BEGIN@12 at line 12 of IO/Compress/Deflate.pm
# once (16µs+75µs) by IO::Uncompress::Adapter::Inflate::BEGIN@7 at line 7 of IO/Uncompress/Adapter/Inflate.pm
# once (79µs+4µs) by IO::Uncompress::Base::BEGIN@19 at line 19 of IO/Uncompress/Base.pm
# once (76µs+3µs) by IO::Compress::Base::BEGIN@11 at line 147 of IO/File.pm
# once (75µs+3µs) by IO::Uncompress::Base::BEGIN@17 at line 17 of IO/Uncompress/Base.pm
# once (70µs+4µs) by IO::Compress::Base::BEGIN@9 at line 9 of IO/Compress/Base.pm
# once (71µs+3µs) by BenchmarkAnything::Storage::Search::Elasticsearch::BEGIN@10 at line 10 of BenchmarkAnything/Storage/Search/Elasticsearch.pm
# once (11µs+62µs) by IO::Compress::RawDeflate::BEGIN@119 at line 119 of IO/Compress/RawDeflate.pm
# once (10µs+58µs) by IO::Compress::Gzip::BEGIN@14 at line 14 of IO/Compress/Gzip.pm
# once (59µs+4µs) by Package::DeprecationManager::BEGIN@11 at line 11 of Package/DeprecationManager.pm
# once (10µs+48µs) by IO::Uncompress::Inflate::BEGIN@8 at line 8 of IO/Uncompress/Inflate.pm
# once (53µs+3µs) by Method::Generate::Accessor::BEGIN@4 at line 4 of Method/Generate/Accessor.pm
# once (54µs+2µs) by BenchmarkAnything::Storage::Frontend::Lib::BEGIN@10 at line 10 of BenchmarkAnything/Storage/Frontend/Lib.pm
# once (52µs+3µs) by IO::Socket::IP::BEGIN@19 at line 19 of IO/Socket/IP.pm
# once (52µs+2µs) by IO::Uncompress::Inflate::BEGIN@9 at line 9 of IO/Uncompress/Inflate.pm
# once (10µs+44µs) by IO::Uncompress::Gunzip::BEGIN@15 at line 15 of IO/Uncompress/Gunzip.pm
# once (50µs+2µs) by Moo::Role::BEGIN@4 at line 4 of Moo/Role.pm
# once (17µs+35µs) by Search::Elasticsearch::Role::Cxn::BEGIN@11 at line 11 of Search/Elasticsearch/Role/Cxn.pm
# once (10µs+42µs) by IO::Compress::Adapter::Deflate::BEGIN@7 at line 7 of IO/Compress/Adapter/Deflate.pm
# once (8µs+42µs) by IO::Uncompress::RawInflate::BEGIN@9 at line 9 of IO/Uncompress/RawInflate.pm
# once (47µs+2µs) by Log::Any::BEGIN@11 at line 11 of Log/Any.pm
# once (46µs+1µs) by JSON::MaybeXS::BEGIN@29 at line 31 of JSON/MaybeXS.pm
# once (44µs+2µs) by Moose::Util::MetaRole::BEGIN@6 at line 6 of Moose/Util/MetaRole.pm
# once (43µs+3µs) by Sereal::Decoder::BEGIN@5 at line 5 of Sereal/Decoder.pm
# once (12µs+33µs) by DBD::mysql::dr::BEGIN@119 at line 119 of DBD/mysql.pm
# once (41µs+4µs) by Moose::BEGIN@10 at line 10 of Moose.pm
# once (43µs+2µs) by Class::MOP::BEGIN@11 at line 11 of Class/MOP.pm
# once (41µs+3µs) by IO::Compress::Deflate::BEGIN@14 at line 14 of IO/Compress/Deflate.pm
# once (38µs+2µs) by Moo::HandleMoose::BEGIN@4 at line 4 of Moo/HandleMoose.pm
# once (39µs+2µs) by Method::Generate::BuildAll::BEGIN@7 at line 7 of Method/Generate/BuildAll.pm
# once (36µs+2µs) by Moose::Meta::TypeCoercion::Union::BEGIN@8 at line 8 of Moose/Meta/TypeCoercion/Union.pm
# once (36µs+1µs) by Search::Elasticsearch::Role::Transport::BEGIN@7 at line 7 of Search/Elasticsearch/Role/Transport.pm
# once (34µs+3µs) by Moose::Meta::Attribute::BEGIN@7 at line 7 of Moose/Meta/Attribute.pm
# once (34µs+1µs) by YAML::XS::BEGIN@19 at line 19 of YAML/XS.pm
# once (33µs+2µs) by Try::Tiny::BEGIN@13 at line 13 of Try/Tiny.pm
# once (33µs+1µs) by Data::OptList::BEGIN@10 at line 95 of Params/Util.pm
# once (33µs+1µs) by Moose::Meta::Role::Composite::BEGIN@8 at line 8 of Moose/Meta/Role/Composite.pm
# once (32µs+1µs) by Class::MOP::Instance::BEGIN@7 at line 7 of Class/MOP/Instance.pm
# once (32µs+2µs) by Moo::BEGIN@4 at line 4 of Moo.pm
# once (32µs+1µs) by Class::MOP::Attribute::BEGIN@9 at line 9 of Class/MOP/Attribute.pm
# once (31µs+1µs) by CHI::Util::BEGIN@8 at line 8 of CHI/Util.pm
# once (30µs+1µs) by CHI::Stats::BEGIN@3 at line 3 of CHI/Stats.pm
# once (30µs+1µs) by Sub::Install::BEGIN@6 at line 6 of Sub/Install.pm
# once (30µs+1µs) by CHI::BEGIN@4 at line 4 of CHI.pm
# once (29µs+2µs) by Attribute::Handlers::BEGIN@3 at line 3 of Attribute/Handlers.pm
# once (29µs+1µs) by IO::Uncompress::Adapter::Inflate::BEGIN@8 at line 8 of IO/Uncompress/Adapter/Inflate.pm
# once (29µs+1µs) by Search::Elasticsearch::Transport::BEGIN@7 at line 7 of Search/Elasticsearch/Transport.pm
# once (28µs+1µs) by Moose::Util::TypeConstraints::Builtins::BEGIN@7 at line 7 of Moose/Util/TypeConstraints/Builtins.pm
# once (28µs+1µs) by Class::MOP::Mixin::HasMethods::BEGIN@9 at line 9 of Class/MOP/Mixin/HasMethods.pm
# once (28µs+1µs) by Moose::Meta::Role::BEGIN@8 at line 8 of Moose/Meta/Role.pm
# once (27µs+1µs) by Sub::Defer::BEGIN@5 at line 5 of Sub/Defer.pm
# once (27µs+1µs) by Search::Elasticsearch::Role::Client::Direct::BEGIN@7 at line 7 of Search/Elasticsearch/Role/Client/Direct.pm
# once (27µs+1µs) by Eval::Closure::BEGIN@13 at line 13 of Eval/Closure.pm
# once (27µs+1000ns) by Package::DeprecationManager::BEGIN@8 at line 8 of Package/DeprecationManager.pm
# once (27µs+1µs) by Module::Implementation::BEGIN@9 at line 9 of Module/Implementation.pm
# once (27µs+1µs) by Moose::Meta::Attribute::BEGIN@21 at line 21 of Moose/Meta/Attribute.pm
# once (26µs+1µs) by Moose::BEGIN@12 at line 12 of Moose.pm
# once (27µs+0s) by Getopt::Long::BEGIN@25 at line 25 of Getopt/Long.pm
# once (26µs+1µs) by URI::_query::BEGIN@7 at line 7 of URI/_query.pm
# once (26µs+1µs) by DBIx::MultiStatementDo::BEGIN@9 at line 9 of DBIx/MultiStatementDo.pm
# once (26µs+1µs) by Devel::OverloadInfo::BEGIN@18 at line 18 of Devel/OverloadInfo.pm
# once (26µs+900ns) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Parameterized.pm
# once (25µs+1µs) by IO::Socket::IP::BEGIN@34 at line 34 of IO/Socket/IP.pm
# once (24µs+1µs) by Method::Generate::BuildAll::BEGIN@6 at line 6 of Method/Generate/BuildAll.pm
# once (24µs+1µs) by Moo::HandleMoose::BEGIN@5 at line 5 of Moo/HandleMoose.pm
# once (24µs+1µs) by Moose::Meta::TypeConstraint::BEGIN@13 at line 13 of Moose/Meta/TypeConstraint.pm
# once (24µs+1µs) by B::Deparse::BEGIN@11 at line 11 of B/Deparse.pm
# once (24µs+900ns) by Encode::BEGIN@47 at line 47 of Encode.pm
# once (24µs+1µs) by IO::Handle::BEGIN@266 at line 266 of IO/Handle.pm
# once (23µs+1µs) by IO::Handle::BEGIN@267 at line 267 of IO/Handle.pm
# once (23µs+1000ns) by IO::Socket::IP::BEGIN@17 at line 17 of IO/Socket/IP.pm
# once (23µs+1µs) by Search::Elasticsearch::Role::Client::Direct::BEGIN@9 at line 9 of Search/Elasticsearch/Role/Client/Direct.pm
# once (23µs+900ns) by Moose::Exporter::BEGIN@7 at line 7 of Moose/Exporter.pm
# once (23µs+1µs) by Class::MOP::Mixin::HasMethods::BEGIN@10 at line 10 of Class/MOP/Mixin/HasMethods.pm
# once (23µs+1µs) by Search::Elasticsearch::Role::Logger::BEGIN@6 at line 6 of Search/Elasticsearch/Role/Logger.pm
# once (23µs+1µs) by Search::Elasticsearch::Role::Serializer::JSON::BEGIN@7 at line 7 of Search/Elasticsearch/Role/Serializer/JSON.pm
# once (23µs+1µs) by Class::Load::BEGIN@13 at line 13 of Class/Load.pm
# once (22µs+1000ns) by Search::Elasticsearch::Util::BEGIN@5 at line 5 of Search/Elasticsearch/Util.pm
# once (21µs+2µs) by DBD::mysql::BEGIN@11 at line 11 of DBD/mysql.pm
# once (22µs+1µs) by Tie::Hash::BEGIN@190 at line 190 of Tie/Hash.pm
# once (22µs+900ns) by Moose::Util::BEGIN@14 at line 14 of Moose/Util.pm
# once (22µs+1µs) by Class::MOP::Method::BEGIN@7 at line 7 of Class/MOP/Method.pm
# once (22µs+900ns) by CHI::Util::BEGIN@6 at line 6 of CHI/Util.pm
# once (22µs+900ns) by Method::Generate::Accessor::BEGIN@7 at line 7 of Method/Generate/Accessor.pm
# once (22µs+800ns) by Data::Dumper::BEGIN@22 at line 22 of Data/Dumper.pm
# once (21µs+1µs) by Class::MOP::Mixin::HasOverloads::BEGIN@9 at line 9 of Class/MOP/Mixin/HasOverloads.pm
# once (21µs+1µs) by Moose::Util::BEGIN@11 at line 11 of Moose/Util.pm
# once (21µs+900ns) by IO::Compress::Base::Common::BEGIN@7 at line 7 of IO/Compress/Base/Common.pm
# once (21µs+800ns) by Class::MOP::Method::Meta::BEGIN@7 at line 7 of Class/MOP/Method/Meta.pm
# once (21µs+1µs) by Sub::Quote::BEGIN@7 at line 7 of Sub/Quote.pm
# once (21µs+1µs) by Method::Generate::Constructor::BEGIN@4 at line 4 of Method/Generate/Constructor.pm
# once (21µs+1µs) by namespace::clean::BEGIN@38 at line 38 of namespace/clean.pm
# once (21µs+900ns) by Class::MOP::Overload::BEGIN@8 at line 8 of Class/MOP/Overload.pm
# once (21µs+900ns) by Moose::Meta::Method::Delegation::BEGIN@7 at line 7 of Moose/Meta/Method/Delegation.pm
# once (21µs+600ns) by Class::MOP::Overload::BEGIN@9 at line 9 of Class/MOP/Overload.pm
# once (20µs+900ns) by IO::Socket::INET::BEGIN@13 at line 13 of IO/Socket/INET.pm
# once (21µs+0s) by DBD::mysql::BEGIN@9 at line 9 of DBD/mysql.pm
# once (20µs+1µs) by CHI::Util::BEGIN@9 at line 9 of CHI/Util.pm
# once (20µs+800ns) by IO::Uncompress::Base::BEGIN@20 at line 20 of IO/Uncompress/Base.pm
# once (20µs+1µs) by Socket::BEGIN@687 at line 687 of Socket.pm
# once (20µs+800ns) by Search::Elasticsearch::Role::Cxn::BEGIN@6 at line 6 of Search/Elasticsearch/Role/Cxn.pm
# once (21µs+0s) by IO::Compress::RawDeflate::BEGIN@9 at line 9 of IO/Compress/RawDeflate.pm
# once (20µs+900ns) by Class::MOP::Method::Constructor::BEGIN@7 at line 7 of Class/MOP/Method/Constructor.pm
# once (20µs+600ns) by Sub::Quote::BEGIN@8 at line 8 of Sub/Quote.pm
# once (21µs+0s) by Moose::Meta::TypeConstraint::Class::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Class.pm
# once (20µs+1µs) by IO::File::BEGIN@130 at line 130 of IO/File.pm
# once (19µs+1µs) by SQL::SplitStatement::BEGIN@14 at line 14 of SQL/SplitStatement.pm
# once (20µs+800ns) by Class::XSAccessor::Heavy::BEGIN@7 at line 7 of Class/XSAccessor/Heavy.pm
# once (20µs+800ns) by Moose::Meta::Method::Constructor::BEGIN@7 at line 7 of Moose/Meta/Method/Constructor.pm
# once (19µs+800ns) by Compress::Raw::Zlib::BEGIN@6 at line 6 of Compress/Raw/Zlib.pm
# once (19µs+900ns) by IO::Socket::BEGIN@14 at line 14 of IO/Socket.pm
# once (19µs+800ns) by CHI::Util::BEGIN@11 at line 11 of CHI/Util.pm
# once (19µs+600ns) by Class::MOP::Method::Accessor::BEGIN@8 at line 8 of Class/MOP/Method/Accessor.pm
# once (19µs+700ns) by Devel::OverloadInfo::BEGIN@17 at line 17 of Devel/OverloadInfo.pm
# once (19µs+1µs) by Class::MOP::Method::Accessor::BEGIN@7 at line 7 of Class/MOP/Method/Accessor.pm
# once (19µs+700ns) by Moose::Meta::TypeConstraint::BEGIN@16 at line 16 of Moose/Meta/TypeConstraint.pm
# once (19µs+700ns) by Moose::Meta::Method::Destructor::BEGIN@9 at line 9 of Moose/Meta/Method/Destructor.pm
# once (19µs+800ns) by CHI::Util::BEGIN@3 at line 3 of CHI/Util.pm
# once (19µs+800ns) by Time::Duration::Parse::BEGIN@7 at line 7 of Time/Duration/Parse.pm
# once (19µs+700ns) by Moose::Meta::Attribute::BEGIN@9 at line 9 of Moose/Meta/Attribute.pm
# once (19µs+1000ns) by IO::Compress::Base::Common::BEGIN@523 at line 523 of IO/Compress/Base/Common.pm
# once (19µs+900ns) by IO::Seekable::BEGIN@98 at line 98 of IO/Seekable.pm
# once (19µs+900ns) by IO::Socket::UNIX::BEGIN@12 at line 12 of IO/Socket/UNIX.pm
# once (18µs+800ns) by SelectSaver::BEGIN@38 at line 38 of SelectSaver.pm
# once (18µs+800ns) by Class::MOP::Method::Wrapped::BEGIN@7 at line 7 of Class/MOP/Method/Wrapped.pm
# once (18µs+900ns) by Class::MOP::Method::Generated::BEGIN@7 at line 7 of Class/MOP/Method/Generated.pm
# once (18µs+900ns) by Data::UUID::BEGIN@5 at line 5 of Data/UUID.pm
# once (18µs+1µs) by Moose::Meta::TypeConstraint::DuckType::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/DuckType.pm
# once (18µs+700ns) by IO::BEGIN@6 at line 6 of IO.pm
# once (18µs+700ns) by IO::File::BEGIN@131 at line 131 of IO/File.pm
# once (18µs+800ns) by Class::MOP::Attribute::BEGIN@11 at line 11 of Class/MOP/Attribute.pm
# once (19µs+0s) by IO::Uncompress::RawInflate::BEGIN@11 at line 11 of IO/Uncompress/RawInflate.pm
# once (18µs+800ns) by Moose::Meta::Method::Destructor::BEGIN@8 at line 8 of Moose/Meta/Method/Destructor.pm
# once (17µs+800ns) by Class::MOP::Class::BEGIN@13 at line 13 of Class/MOP/Class.pm
# once (17µs+1000ns) by CHI::Util::BEGIN@5 at line 5 of CHI/Util.pm
# once (17µs+800ns) by IO::File::BEGIN@133 at line 133 of IO/File.pm
# once (17µs+800ns) by Moose::Exporter::BEGIN@11 at line 11 of Moose/Exporter.pm
# once (16µs+2µs) by Class::MOP::Mixin::HasAttributes::BEGIN@7 at line 7 of Class/MOP/Mixin/HasAttributes.pm
# once (17µs+700ns) by File::GlobMapper::BEGIN@5 at line 5 of File/GlobMapper.pm
# once (17µs+1µs) by Log::Any::Adapter::Base::BEGIN@10 at line 10 of Log/Any/Adapter/Base.pm
# once (17µs+700ns) by Moose::Meta::TypeConstraint::Parameterizable::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint/Parameterizable.pm
# once (17µs+600ns) by Search::Elasticsearch::Role::Serializer::JSON::BEGIN@8 at line 8 of Search/Elasticsearch/Role/Serializer/JSON.pm
# once (17µs+900ns) by base::import at line 22 of Class/Accessor.pm
# once (17µs+700ns) by Class::MOP::Attribute::BEGIN@10 at line 10 of Class/MOP/Attribute.pm
# once (17µs+500ns) by Moose::Meta::Role::Attribute::BEGIN@8 at line 8 of Moose/Meta/Role/Attribute.pm
# once (17µs+700ns) by Class::MOP::Method::Inlined::BEGIN@7 at line 7 of Class/MOP/Method/Inlined.pm
# once (16µs+800ns) by Moose::Meta::Class::Immutable::Trait::BEGIN@8 at line 8 of Moose/Meta/Class/Immutable/Trait.pm
# once (16µs+500ns) by IO::Compress::Base::Common::BEGIN@8 at line 8 of IO/Compress/Base/Common.pm
# once (16µs+600ns) by IO::Seekable::BEGIN@104 at line 104 of IO/Seekable.pm
# once (16µs+800ns) by IO::Compress::RawDeflate::BEGIN@120 at line 120 of IO/Compress/RawDeflate.pm
# once (16µs+800ns) by Moose::Meta::Method::Accessor::BEGIN@7 at line 7 of Moose/Meta/Method/Accessor.pm
# once (17µs+0s) by Moose::Meta::TypeConstraint::Role::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Role.pm
# once (16µs+700ns) by Moose::Meta::TypeConstraint::BEGIN@15 at line 15 of Moose/Meta/TypeConstraint.pm
# once (16µs+600ns) by Class::XSAccessor::BEGIN@5 at line 5 of Class/XSAccessor.pm
# once (16µs+800ns) by Moose::Meta::TypeConstraint::Registry::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Registry.pm
# once (16µs+700ns) by Moose::Meta::Object::Trait::BEGIN@4 at line 4 of Moose/Meta/Object/Trait.pm
# once (16µs+500ns) by Eval::Closure::BEGIN@16 at line 16 of Eval/Closure.pm
# once (16µs+600ns) by IO::Uncompress::Base::BEGIN@23 at line 23 of IO/Uncompress/Base.pm
# once (15µs+900ns) by Moose::Util::TypeConstraints::BEGIN@5 at line 5 of Moose/Util/TypeConstraints.pm
# once (15µs+800ns) by Class::MOP::Package::BEGIN@7 at line 7 of Class/MOP/Package.pm
# once (16µs+0s) by IO::Compress::Base::BEGIN@914 at line 914 of IO/Compress/Base.pm
# once (15µs+700ns) by Class::MOP::Method::Meta::BEGIN@8 at line 8 of Class/MOP/Method/Meta.pm
# once (16µs+500ns) by Class::MOP::Object::BEGIN@8 at line 8 of Class/MOP/Object.pm
# once (15µs+600ns) by Class::MOP::Method::Constructor::BEGIN@8 at line 8 of Class/MOP/Method/Constructor.pm
# once (15µs+800ns) by Log::Any::Adapter::Util::BEGIN@10 at line 10 of Log/Any/Adapter/Util.pm
# once (15µs+700ns) by URI::_server::BEGIN@8 at line 8 of URI/_server.pm
# once (15µs+600ns) by Moose::Util::BEGIN@9 at line 9 of Moose/Util.pm
# once (15µs+700ns) by Moose::Meta::Role::Application::ToInstance::BEGIN@8 at line 8 of Moose/Meta/Role/Application/ToInstance.pm
# once (15µs+900ns) by SQL::SplitStatement::BEGIN@13 at line 13 of SQL/SplitStatement.pm
# once (16µs+0s) by Class::Load::XS::BEGIN@8 at line 8 of Class/Load/XS.pm
# once (15µs+600ns) by Method::Generate::Constructor::BEGIN@5 at line 5 of Method/Generate/Constructor.pm
# once (15µs+700ns) by Moose::Exporter::BEGIN@13 at line 13 of Moose/Exporter.pm
# once (15µs+600ns) by Moose::Meta::Class::BEGIN@11 at line 11 of Moose/Meta/Class.pm
# once (15µs+600ns) by Class::MOP::Mixin::BEGIN@7 at line 7 of Class/MOP/Mixin.pm
# once (15µs+500ns) by Class::MOP::Class::BEGIN@17 at line 17 of Class/MOP/Class.pm
# once (15µs+0s) by IO::Socket::BEGIN@17 at line 17 of IO/Socket.pm
# once (14µs+800ns) by URI::_generic::BEGIN@8 at line 8 of URI/_generic.pm
# once (15µs+600ns) by Class::MOP::Mixin::AttributeCore::BEGIN@7 at line 7 of Class/MOP/Mixin/AttributeCore.pm
# once (14µs+600ns) by SelectSaver::BEGIN@39 at line 39 of SelectSaver.pm
# once (14µs+500ns) by YAML::XS::BEGIN@20 at line 20 of YAML/XS.pm
# once (15µs+400ns) by Method::Generate::Accessor::BEGIN@8 at line 8 of Method/Generate/Accessor.pm
# once (14µs+400ns) by Moose::Meta::Role::Application::RoleSummation::BEGIN@9 at line 9 of Moose/Meta/Role/Application/RoleSummation.pm
# once (14µs+600ns) by Moose::Util::TypeConstraints::Builtins::BEGIN@9 at line 9 of Moose/Util/TypeConstraints/Builtins.pm
# once (14µs+300ns) by Eval::Closure::BEGIN@15 at line 15 of Eval/Closure.pm
# once (13µs+600ns) by Moose::Meta::TypeConstraint::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint.pm
# once (13µs+700ns) by Moose::Meta::Role::Application::ToClass::BEGIN@10 at line 10 of Moose/Meta/Role/Application/ToClass.pm
# once (13µs+500ns) by Class::MOP::Mixin::HasOverloads::BEGIN@10 at line 10 of Class/MOP/Mixin/HasOverloads.pm
# once (13µs+500ns) by Class::MOP::Mixin::HasOverloads::BEGIN@11 at line 11 of Class/MOP/Mixin/HasOverloads.pm
# once (12µs+400ns) by Method::Generate::Constructor::BEGIN@6 at line 6 of Method/Generate/Constructor.pm
# once (13µs+0s) by Cpanel::JSON::XS::BEGIN@171 at line 171 of Cpanel/JSON/XS.pm
# once (12µs+500ns) by IO::Compress::RawDeflate::BEGIN@150 at line 150 of IO/Compress/RawDeflate.pm
# once (12µs+500ns) by Class::MOP::Method::Wrapped::BEGIN@8 at line 8 of Class/MOP/Method/Wrapped.pm
# once (12µs+0s) by BenchmarkAnything::Storage::Backend::SQL::Query::BEGIN@7 at line 7 of BenchmarkAnything/Storage/Backend/SQL/Query.pm
# once (12µs+500ns) by Moose::Meta::Role::Application::ToInstance::BEGIN@10 at line 10 of Moose/Meta/Role/Application/ToInstance.pm
# once (12µs+400ns) by Class::MOP::Class::BEGIN@15 at line 15 of Class/MOP/Class.pm
# once (12µs+400ns) by Sub::Defer::BEGIN@6 at line 6 of Sub/Defer.pm
# once (12µs+0s) by IO::Socket::BEGIN@12 at line 12 of IO/Socket.pm
# once (11µs+0s) by Moose::Meta::TypeConstraint::Enum::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Enum.pm
# once (11µs+0s) by IO::Uncompress::Inflate::BEGIN@11 at line 11 of IO/Uncompress/Inflate.pm
# once (10µs+400ns) by Class::MOP::Class::BEGIN@16 at line 16 of Class/MOP/Class.pm
# once (11µs+0s) by Sub::Identify::BEGIN@4 at line 4 of Sub/Identify.pm
# once (11µs+0s) by IO::Uncompress::Gunzip::BEGIN@12 at line 12 of IO/Uncompress/Gunzip.pm
# once (10µs+0s) by Moose::Meta::TypeConstraint::DuckType::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/DuckType.pm
# once (10µs+0s) by IO::Socket::INET::BEGIN@14 at line 14 of IO/Socket/INET.pm
# once (9µs+0s) by SQL::Tokenizer::BEGIN@8 at line 8 of SQL/Tokenizer.pm
# once (9µs+0s) by IO::Socket::BEGIN@18 at line 18 of IO/Socket.pm
# once (8µs+0s) by Sereal::Decoder::BEGIN@16 at line 16 of Sereal/Decoder.pm
# once (7µs+0s) by Try::Tiny::BEGIN@10 at line 10 of Try/Tiny.pm
# once (7µs+0s) by Eval::Closure::BEGIN@10 at line 10 of Eval/Closure.pm
# once (7µs+0s) by IO::Socket::INET::BEGIN@15 at line 15 of IO/Socket/INET.pm
# once (6µs+0s) by Encode::BEGIN@12 at line 12 of Encode.pm
# once (6µs+0s) by Devel::OverloadInfo::BEGIN@22 at line 22 of Devel/OverloadInfo.pm
# once (5µs+0s) by Sub::Name::BEGIN@58 at line 58 of Sub/Name.pm
# once (5µs+0s) by Encode::Alias::BEGIN@8 at line 8 of Encode/Alias.pm
# once (5µs+0s) by Sub::Quote::BEGIN@9 at line 9 of Sub/Quote.pm
# once (4µs+0s) by Moo::_Utils::BEGIN@22 at line 22 of Moo/_Utils.pm
# once (4µs+0s) by URI::Escape::BEGIN@140 at line 140 of URI/Escape.pm
# once (4µs+0s) by Sub::Defer::BEGIN@4 at line 4 of Sub/Defer.pm | ||||
29 | 278 | 75µs | my $pkg = shift; | ||
30 | 278 | 124µs | my $callpkg = caller($ExportLevel); | ||
31 | |||||
32 | 278 | 88µs | if ($pkg eq "Exporter" and @_ and $_[0] eq "import") { | ||
33 | 11 | 26µs | *{$callpkg."::import"} = \&import; | ||
34 | 11 | 28µs | return; | ||
35 | } | ||||
36 | |||||
37 | # We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-( | ||||
38 | 267 | 321µs | my $exports = \@{"$pkg\::EXPORT"}; | ||
39 | # But, avoid creating things if they don't exist, which saves a couple of | ||||
40 | # hundred bytes per package processed. | ||||
41 | 267 | 249µs | my $fail = ${$pkg . '::'}{EXPORT_FAIL} && \@{"$pkg\::EXPORT_FAIL"}; | ||
42 | 267 | 131µs | return export $pkg, $callpkg, @_ | ||
43 | if $Verbose or $Debug or $fail && @$fail > 1; | ||||
44 | 267 | 138µs | my $export_cache = ($Cache{$pkg} ||= {}); | ||
45 | 267 | 204µs | my $args = @_ or @_ = @$exports; | ||
46 | |||||
47 | 267 | 76µs | if ($args and not %$export_cache) { | ||
48 | s/^&//, $export_cache->{$_} = 1 | ||||
49 | 32 | 1.77ms | 1783 | 97µs | foreach (@$exports, @{"$pkg\::EXPORT_OK"}); # spent 97µs making 1783 calls to Exporter::CORE:subst, avg 55ns/call |
50 | } | ||||
51 | 267 | 31µs | my $heavy; | ||
52 | # Try very hard not to use {} and hence have to enter scope on the foreach | ||||
53 | # We bomb out of the loop with last as soon as heavy is set. | ||||
54 | 267 | 87µs | if ($args or $fail) { | ||
55 | ($heavy = (/\W/ or $args and not exists $export_cache->{$_} | ||||
56 | or $fail and @$fail and $_ eq $fail->[0])) and last | ||||
57 | 197 | 1.27ms | 759 | 210µs | foreach (@_); # spent 210µs making 759 calls to Exporter::CORE:match, avg 276ns/call |
58 | } else { | ||||
59 | ($heavy = /\W/) and last | ||||
60 | 70 | 615µs | 556 | 93µs | foreach (@_); # spent 93µs making 556 calls to Exporter::CORE:match, avg 167ns/call |
61 | } | ||||
62 | 267 | 101µs | 21 | 1.13ms | return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy; # spent 1.13ms making 21 calls to Exporter::export, avg 54µs/call |
63 | local $SIG{__WARN__} = | ||||
64 | 246 | 685µs | sub {require Carp; &Carp::carp} if not $SIG{__WARN__}; | ||
65 | # shortcut for the common case of no type character | ||||
66 | 246 | 3.15ms | *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_; | ||
67 | } | ||||
68 | |||||
69 | # Default methods | ||||
70 | |||||
71 | sub export_fail { | ||||
72 | my $self = shift; | ||||
73 | @_; | ||||
74 | } | ||||
75 | |||||
76 | # Unfortunately, caller(1)[3] "does not work" if the caller is aliased as | ||||
77 | # *name = \&foo. Thus the need to create a lot of identical subroutines | ||||
78 | # Otherwise we could have aliased them to export(). | ||||
79 | |||||
80 | # spent 50µs (12+38) within Exporter::export_to_level which was called 2 times, avg 25µs/call:
# 2 times (12µs+38µs) by Time::HiRes::import at line 63 of Time/HiRes.pm, avg 25µs/call | ||||
81 | 2 | 17µs | 4 | 221µs | goto &{as_heavy()}; # spent 183µs making 2 calls to Exporter::Heavy::heavy_export_to_level, avg 91µs/call
# spent 38µs making 2 calls to Exporter::as_heavy, avg 19µs/call |
82 | } | ||||
83 | |||||
84 | sub export_tags { | ||||
85 | goto &{as_heavy()}; | ||||
86 | } | ||||
87 | |||||
88 | # spent 86µs (22+64) within Exporter::export_ok_tags which was called 7 times, avg 12µs/call:
# once (4µs+11µs) by DBI::BEGIN@181 at line 284 of DBI.pm
# once (4µs+9µs) by IO::Uncompress::Inflate::BEGIN@11 at line 25 of IO/Uncompress/RawInflate.pm
# once (4µs+9µs) by IO::Compress::Deflate::BEGIN@11 at line 43 of IO/Compress/RawDeflate.pm
# once (3µs+9µs) by Search::Elasticsearch::Role::Cxn::BEGIN@9 at line 23 of IO/Uncompress/Inflate.pm
# once (3µs+9µs) by Search::Elasticsearch::Role::Cxn::BEGIN@10 at line 36 of IO/Compress/Gzip.pm
# once (3µs+8µs) by Search::Elasticsearch::Role::Cxn::BEGIN@11 at line 27 of IO/Uncompress/Gunzip.pm
# once (3µs+8µs) by Search::Elasticsearch::Role::Cxn::BEGIN@8 at line 28 of IO/Compress/Deflate.pm | ||||
89 | 7 | 30µs | 14 | 152µs | goto &{as_heavy()}; # spent 88µs making 7 calls to Exporter::Heavy::heavy_export_ok_tags, avg 13µs/call
# spent 64µs making 7 calls to Exporter::as_heavy, avg 9µs/call |
90 | } | ||||
91 | |||||
92 | sub require_version { | ||||
93 | goto &{as_heavy()}; | ||||
94 | } | ||||
95 | |||||
96 | 1 | 3µs | 1; | ||
97 | __END__ | ||||
sub Exporter::CORE:match; # opcode | |||||
sub Exporter::CORE:subst; # opcode |