Filename | /usr/share/perl/5.18/Exporter.pm |
Statements | Executed 3895 statements in 16.8ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
253 | 224 | 133 | 11.1ms | 17.3ms | import | Exporter::
3 | 2 | 2 | 4.03ms | 5.29ms | export_to_level | Exporter::
23 | 4 | 1 | 1.35ms | 1.49ms | as_heavy | Exporter::
1255 | 2 | 1 | 385µs | 385µs | CORE:match (opcode) | Exporter::
1748 | 2 | 1 | 362µs | 362µs | CORE:subst (opcode) | Exporter::
18 | 5 | 4 | 84µs | 284µs | export | Exporter::
1 | 1 | 1 | 7µs | 21µs | export_tags | Exporter::
1 | 1 | 1 | 6µs | 18µs | export_ok_tags | Exporter::
0 | 0 | 0 | 0s | 0s | __ANON__[:64] | Exporter::
0 | 0 | 0 | 0s | 0s | export_fail | 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 | 300ns | our $VERSION = '5.68'; | ||
13 | 1 | 200ns | our (%Cache); | ||
14 | |||||
15 | # spent 1.49ms (1.35+139µs) within Exporter::as_heavy which was called 23 times, avg 65µs/call:
# 18 times (149µs+51µs) by Exporter::export at line 25, avg 11µs/call
# 3 times (1.19ms+82µs) by Exporter::export_to_level at line 81, avg 422µs/call
# once (10µs+4µs) by Exporter::export_tags at line 85
# once (10µs+2µs) by Exporter::export_ok_tags at line 89 | ||||
16 | 23 | 71µ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 | 23 | 49µs | my $c = (caller(1))[3]; | ||
20 | 23 | 120µs | 23 | 65µs | $c =~ s/.*:://; # spent 65µs making 23 calls to Exporter::CORE:subst, avg 3µs/call |
21 | 23 | 4.11ms | \&{"Exporter::Heavy::heavy_$c"}; | ||
22 | } | ||||
23 | |||||
24 | # spent 284µs (84+199) within Exporter::export which was called 18 times, avg 16µs/call:
# 10 times (57µs+119µs) by Exporter::import at line 62, avg 18µs/call
# 3 times (11µs+37µs) by IO::Socket::import at line 36 of IO/Socket.pm, avg 16µs/call
# 3 times (9µs+20µs) by Exporter::Heavy::heavy_export_to_level at line 200 of Exporter/Heavy.pm, avg 10µs/call
# once (4µs+16µs) by FileHandle::import at line 73 of FileHandle.pm
# once (2µs+7µs) by FileHandle::import at line 81 of FileHandle.pm | ||||
25 | 18 | 97µs | 36 | 12.8ms | goto &{as_heavy()}; # spent 12.6ms making 18 calls to Exporter::Heavy::heavy_export, avg 700µs/call
# spent 199µs making 18 calls to Exporter::as_heavy, avg 11µs/call |
26 | } | ||||
27 | |||||
28 | # spent 17.3ms (11.1+6.26) within Exporter::import which was called 253 times, avg 68µs/call:
# 16 times (385µs+19µs) by Class::MOP::Class::BEGIN@18 or Getopt::Long::Descriptive::BEGIN@9 or Getopt::Long::Descriptive::Usage::BEGIN@6 or HTTP::Server::PSGI::BEGIN@11 or Moose::Meta::Attribute::BEGIN@8 or Moose::Meta::Class::BEGIN@9 or Moose::Meta::Method::Accessor::Native::Writer::BEGIN@7 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 at line 34 of List/Util.pm, avg 25µs/call
# 15 times (164µs+4.75ms) by B::Deparse::BEGIN@29 at line 38 of B/Deparse.pm, avg 328µs/call
# once (690µs+117µs) by POSIX::import at line 30 of POSIX.pm
# once (630µs+22µs) by IO::Socket::INET::BEGIN@12 at line 12 of IO/Socket/INET.pm
# once (528µs+79µs) by B::Deparse::BEGIN@12 at line 12 of B/Deparse.pm
# once (259µs+233µs) by Test::PONAPI::Repository::MockDB::BEGIN@8 at line 8 of lib/Test/PONAPI/Repository/MockDB.pm
# once (408µs+18µs) by IO::Socket::BEGIN@12 at line 12 of IO/Socket.pm
# once (379µs+31µs) by HTTP::Server::PSGI::BEGIN@16 at line 16 of HTTP/Server/PSGI.pm
# once (211µs+12µs) by Time::Piece::BEGIN@7 at line 7 of Time/Piece.pm
# once (193µs+16µs) by File::stat::BEGIN@30 at line 30 of File/stat.pm
# once (189µs+7µs) by File::Temp::BEGIN@148 at line 148 of File/Temp.pm
# once (186µs+9µs) by Pod::Perldoc::BEGIN@8 at line 8 of Pod/Perldoc.pm
# once (33µs+157µs) by Storable::BEGIN@52 at line 53 of Storable.pm
# once (41µs+145µs) by Getopt::Long::Descriptive::BEGIN@10 at line 10 of Getopt/Long/Descriptive.pm
# once (177µs+8µs) by HTTP::Server::PSGI::BEGIN@10 at line 10 of HTTP/Server/PSGI.pm
# once (156µs+13µs) by HTTP::Headers::ActionPack::Core::BaseHeaderType::BEGIN@13 at line 13 of HTTP/Headers/ActionPack/Core/BaseHeaderType.pm
# once (143µs+6µs) by Time::Piece::BEGIN@8 at line 8 of Time/Piece.pm
# once (23µs+112µs) by Getopt::Long::import at line 114 of Getopt/Long.pm
# once (119µs+5µs) by POSIX::BEGIN@11 at line 11 of POSIX.pm
# once (113µs+10µs) by Stream::Buffered::BEGIN@5 at line 39 of FileHandle.pm
# once (104µs+11µs) by HTTP::Headers::ActionPack::MediaType::BEGIN@13 at line 13 of HTTP/Headers/ActionPack/MediaType.pm
# once (109µs+5µs) by HTTP::Body::MultiPart::BEGIN@10 at line 10 of HTTP/Body/MultiPart.pm
# once (104µs+5µs) by HTTP::Body::XFormsMultipart::BEGIN@10 at line 10 of HTTP/Body/XFormsMultipart.pm
# once (33µs+75µs) by PONAPI::DAO::Request::Role::UpdateLike::BEGIN@6 at line 6 of lib/PONAPI/DAO/Request/Role/UpdateLike.pm
# once (95µs+6µs) by PONAPI::CLI::RunServer::BEGIN@11 at line 11 of lib/PONAPI/CLI/RunServer.pm
# once (97µs+4µs) by HTTP::Body::OctetStream::BEGIN@10 at line 10 of HTTP/Body/OctetStream.pm
# once (96µs+4µs) by Stream::Buffered::File::BEGIN@6 at line 6 of Stream/Buffered/File.pm
# once (30µs+70µs) by Test::PONAPI::Repository::MockDB::BEGIN@16 at line 16 of lib/Test/PONAPI/Repository/MockDB.pm
# once (29µs+71µs) by Test::PONAPI::Repository::MockDB::Table::Articles::BEGIN@57 at line 57 of lib/Test/PONAPI/Repository/MockDB/Table/Articles.pm
# once (91µs+4µs) by IO::Dir::BEGIN@15 at line 25 of IO/File.pm
# once (80µs+4µs) by IO::Dir::BEGIN@15 at line 15 of IO/Dir.pm
# once (66µs+4µs) by HTTP::Headers::ActionPack::MediaTypeList::BEGIN@13 at line 13 of HTTP/Headers/ActionPack/MediaTypeList.pm
# once (61µs+5µs) by Package::DeprecationManager::BEGIN@10 at line 10 of Package/DeprecationManager.pm
# once (62µs+4µs) by Module::Pluggable::Object::BEGIN@6 at line 6 of Module/Pluggable/Object.pm
# once (60µs+5µs) by Package::DeprecationManager::BEGIN@11 at line 11 of Package/DeprecationManager.pm
# once (59µs+4µs) by HTTP::Headers::ActionPack::Util::BEGIN@14 at line 14 of HTTP/Headers/ActionPack/Util.pm
# once (59µs+2µs) by Path::Class::File::BEGIN@10 at line 10 of Path/Class/File.pm
# once (59µs+1µs) by HTTP::Body::MultiPart::BEGIN@11 at line 11 of HTTP/Body/MultiPart.pm
# once (54µs+3µs) by Data::OptList::BEGIN@10 at line 95 of Params/Util.pm
# once (55µs+1µs) by HTTP::Body::XFormsMultipart::BEGIN@11 at line 11 of HTTP/Body/XFormsMultipart.pm
# once (52µs+2µs) by Hash::MultiValue::BEGIN@9 at line 9 of Hash/MultiValue.pm
# once (51µs+2µs) by Params::Validate::BEGIN@13 at line 13 of Params/Validate.pm
# once (48µs+2µs) by Time::Piece::BEGIN@9 at line 9 of Time/Piece.pm
# once (44µs+2µs) by PONAPI::CLI::RunServer::BEGIN@12 at line 12 of lib/PONAPI/CLI/RunServer.pm
# once (44µs+3µs) by Module::Pluggable::Object::BEGIN@7 at line 7 of Module/Pluggable/Object.pm
# once (45µs+1µs) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Parameterized.pm
# once (42µs+3µs) by File::Path::BEGIN@6 at line 6 of File/Path.pm
# once (43µs+2µs) by PONAPI::Server::BEGIN@18 at line 18 of lib/PONAPI/Server.pm
# once (42µs+2µs) by Class::MOP::Instance::BEGIN@7 at line 7 of Class/MOP/Instance.pm
# once (43µs+1000ns) by Moose::Meta::Class::Immutable::Trait::BEGIN@8 at line 8 of Moose/Meta/Class/Immutable/Trait.pm
# once (39µs+2µs) by PONAPI::DAO::Request::BEGIN@5 at line 5 of lib/PONAPI/DAO/Request.pm
# once (38µs+2µs) by IO::Dir::BEGIN@18 at line 182 of File/stat.pm
# once (39µs+1µs) by Devel::StackTrace::AsHTML::BEGIN@7 at line 7 of Devel/StackTrace/AsHTML.pm
# once (38µs+2µs) by PONAPI::Exception::BEGIN@7 at line 7 of lib/PONAPI/Exception.pm
# once (38µs+2µs) by Module::Pluggable::Object::BEGIN@5 at line 5 of Module/Pluggable/Object.pm
# once (37µs+2µs) by HTTP::Body::XForms::BEGIN@10 at line 10 of HTTP/Body/XForms.pm
# once (37µs+2µs) by YAML::XS::BEGIN@19 at line 19 of YAML/XS.pm
# once (36µs+2µs) by Getopt::Long::Descriptive::BEGIN@6 at line 6 of Getopt/Long/Descriptive.pm
# once (36µs+2µs) by Moose::Exporter::BEGIN@9 at line 9 of Moose/Exporter.pm
# once (36µs+2µs) by Data::Dumper::BEGIN@22 at line 22 of Data/Dumper.pm
# once (34µs+3µs) by Cookie::Baker::BEGIN@7 at line 7 of Cookie/Baker.pm
# once (35µs+1µs) by File::stat::BEGIN@7 at line 7 of File/stat.pm
# once (35µs+2µs) by Plack::Loader::BEGIN@5 at line 5 of Plack/Loader.pm
# once (35µs+1µs) by HTTP::Headers::ActionPack::Core::BaseHeaderList::BEGIN@13 at line 13 of HTTP/Headers/ActionPack/Core/BaseHeaderList.pm
# once (34µs+2µs) by Moose::Util::TypeConstraints::Builtins::BEGIN@7 at line 7 of Moose/Util/TypeConstraints/Builtins.pm
# once (34µs+2µs) by Moose::Meta::Attribute::BEGIN@21 at line 21 of Moose/Meta/Attribute.pm
# once (34µs+1µs) by Path::Class::Entity::BEGIN@10 at line 10 of Path/Class/Entity.pm
# once (34µs+1000ns) by Plack::Middleware::Lint::BEGIN@6 at line 6 of Plack/Middleware/Lint.pm
# once (32µs+3µs) by PONAPI::Server::BEGIN@15 at line 15 of lib/PONAPI/Server.pm
# once (34µs+1µs) by Moose::Meta::Method::Accessor::Native::BEGIN@7 at line 7 of Moose/Meta/Method/Accessor/Native.pm
# once (33µs+1µs) by Moose::Role::BEGIN@8 at line 8 of Moose/Role.pm
# once (33µs+2µs) by Moose::Meta::Attribute::BEGIN@7 at line 7 of Moose/Meta/Attribute.pm
# once (32µs+2µs) by Class::Struct::BEGIN@11 at line 11 of Class/Struct.pm
# once (33µs+1µs) by IO::Handle::BEGIN@7 at line 7 of IO/Handle.pm
# once (32µs+2µs) by Pod::Perldoc::BEGIN@9 at line 9 of Pod/Perldoc.pm
# once (32µs+1µs) by Sub::Install::BEGIN@6 at line 6 of Sub/Install.pm
# once (32µs+1µs) by Moose::Meta::Role::Composite::BEGIN@8 at line 8 of Moose/Meta/Role/Composite.pm
# once (32µs+2µs) by File::stat::BEGIN@3 at line 3 of (eval 23)[Class/Struct.pm:230]
# once (31µs+2µs) by Class::MOP::Attribute::BEGIN@9 at line 9 of Class/MOP/Attribute.pm
# once (32µs+1µs) by IO::Dir::BEGIN@12 at line 12 of IO/Dir.pm
# once (32µs+1µs) by Moose::Meta::TypeConstraint::BEGIN@13 at line 13 of Moose/Meta/TypeConstraint.pm
# once (31µs+1µs) by Try::Tiny::BEGIN@15 at line 15 of Try/Tiny.pm
# once (31µs+2µs) by IO::Dir::BEGIN@13 at line 13 of IO/Dir.pm
# once (31µs+2µs) by Moose::Meta::Role::BEGIN@8 at line 8 of Moose/Meta/Role.pm
# once (30µs+2µs) by Plack::Runner::BEGIN@6 at line 6 of Plack/Runner.pm
# once (30µs+2µs) by Plack::HTTPParser::BEGIN@7 at line 7 of Plack/HTTPParser.pm
# once (30µs+1µs) by Class::MOP::BEGIN@11 at line 11 of Class/MOP.pm
# once (28µs+3µs) by PONAPI::CLI::Command::gen::BEGIN@9 at line 9 of lib/PONAPI/CLI/Command/gen.pm
# once (30µs+1µs) by HTTP::Headers::ActionPack::BEGIN@13 at line 13 of HTTP/Headers/ActionPack.pm
# once (30µs+1µs) by Socket::BEGIN@10 at line 10 of Socket.pm
# once (30µs+1µs) by Apache::LogFormat::Compiler::BEGIN@6 at line 6 of Apache/LogFormat/Compiler.pm
# once (30µs+1µs) by HTTP::Server::PSGI::BEGIN@7 at line 7 of HTTP/Server/PSGI.pm
# once (30µs+1µs) by Moose::Meta::Object::Trait::BEGIN@4 at line 4 of Moose/Meta/Object/Trait.pm
# once (29µs+2µs) by Moose::BEGIN@12 at line 12 of Moose.pm
# once (29µs+1µs) by Devel::StackTrace::BEGIN@12 at line 12 of Devel/StackTrace.pm
# once (28µs+2µs) by Devel::OverloadInfo::BEGIN@18 at line 18 of Devel/OverloadInfo.pm
# once (29µs+900ns) by Moose::Meta::Method::Constructor::BEGIN@7 at line 7 of Moose/Meta/Method/Constructor.pm
# once (29µs+1µs) by IO::Seekable::BEGIN@6 at line 6 of IO/Seekable.pm
# once (28µs+1µs) by File::Temp::BEGIN@144 at line 144 of File/Temp.pm
# once (29µs+1µs) by IO::File::BEGIN@8 at line 8 of IO/File.pm
# once (28µs+1µs) by Time::Local::BEGIN@4 at line 4 of Time/Local.pm
# once (28µs+1µs) by IO::Socket::UNIX::BEGIN@12 at line 12 of IO/Socket/UNIX.pm
# once (28µs+1µs) by Module::Implementation::BEGIN@13 at line 13 of Module/Implementation.pm
# once (29µs+1µs) by IO::Socket::INET::BEGIN@13 at line 13 of IO/Socket/INET.pm
# once (29µs+1µs) by Moose::Meta::Attribute::BEGIN@9 at line 9 of Moose/Meta/Attribute.pm
# once (28µs+1µs) by Getopt::Long::Descriptive::Opts::BEGIN@6 at line 6 of Getopt/Long/Descriptive/Opts.pm
# once (28µs+1µs) by B::Deparse::BEGIN@11 at line 11 of B/Deparse.pm
# once (28µs+1µs) by Eval::Closure::BEGIN@15 at line 15 of Eval/Closure.pm
# once (28µs+1µs) by IO::Socket::BEGIN@13 at line 13 of IO/Socket.pm
# once (27µs+1µs) by HTTP::Server::PSGI::BEGIN@9 at line 9 of HTTP/Server/PSGI.pm
# once (26µs+2µs) by File::Temp::Dir::BEGIN@2488 at line 2488 of File/Temp.pm
# once (27µs+1µs) by Pod::Perldoc::BEGIN@31 at line 31 of Pod/Perldoc.pm
# once (27µs+1µs) by Moose::Meta::Method::Destructor::BEGIN@9 at line 9 of Moose/Meta/Method/Destructor.pm
# once (27µs+1µs) by POSIX::strftime::Compiler::BEGIN@6 at line 6 of POSIX/strftime/Compiler.pm
# once (27µs+1µs) by Plack::Middleware::StackTrace::BEGIN@8 at line 8 of Plack/Middleware/StackTrace.pm
# once (26µs+2µs) by Class::MOP::Mixin::HasOverloads::BEGIN@9 at line 9 of Class/MOP/Mixin/HasOverloads.pm
# once (26µs+2µs) by IO::Seekable::BEGIN@12 at line 12 of IO/Seekable.pm
# once (26µs+2µs) by File::Temp::BEGIN@147 at line 147 of File/Temp.pm
# once (26µs+1µs) by Moose::Meta::TypeConstraint::Registry::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Registry.pm
# once (26µs+900ns) by Moose::Meta::Role::Application::ToInstance::BEGIN@8 at line 8 of Moose/Meta/Role/Application/ToInstance.pm
# once (25µs+1µs) by Class::Load::BEGIN@18 at line 18 of Class/Load.pm
# once (25µs+1µs) by Moose::Meta::Method::Delegation::BEGIN@7 at line 7 of Moose/Meta/Method/Delegation.pm
# once (25µs+1µs) by Tie::Hash::BEGIN@5 at line 5 of Tie/Hash.pm
# once (25µs+900ns) by Moose::Util::BEGIN@14 at line 14 of Moose/Util.pm
# once (24µs+1µs) by Class::MOP::Attribute::BEGIN@11 at line 11 of Class/MOP/Attribute.pm
# once (24µs+1µs) by SelectSaver::BEGIN@6 at line 6 of SelectSaver.pm
# once (24µs+1µs) by IO::Handle::BEGIN@6 at line 6 of IO/Handle.pm
# once (24µs+1µs) by Class::MOP::Attribute::BEGIN@10 at line 10 of Class/MOP/Attribute.pm
# once (24µs+1µs) by Pod::Perldoc::BEGIN@10 at line 10 of Pod/Perldoc.pm
# once (24µs+1µs) by Class::MOP::Method::Constructor::BEGIN@7 at line 7 of Class/MOP/Method/Constructor.pm
# once (24µs+900ns) by Class::MOP::Method::Generated::BEGIN@7 at line 7 of Class/MOP/Method/Generated.pm
# once (24µs+900ns) by Class::MOP::Method::Constructor::BEGIN@8 at line 8 of Class/MOP/Method/Constructor.pm
# once (24µs+1µs) by Class::MOP::Method::Accessor::BEGIN@7 at line 7 of Class/MOP/Method/Accessor.pm
# once (24µs+1µs) by Class::MOP::Mixin::HasMethods::BEGIN@9 at line 9 of Class/MOP/Mixin/HasMethods.pm
# once (24µs+1µs) by Class::MOP::Package::BEGIN@8 at line 38 of Sub/Exporter/Progressive.pm
# once (24µs+1µs) by Class::MOP::Method::BEGIN@7 at line 7 of Class/MOP/Method.pm
# once (24µs+1µs) by HTTP::Headers::ActionPack::Core::BaseHeaderWithParams::BEGIN@13 at line 13 of HTTP/Headers/ActionPack/Core/BaseHeaderWithParams.pm
# once (24µs+1µs) by HTTP::Server::PSGI::BEGIN@18 at line 18 of HTTP/Server/PSGI.pm
# once (23µs+1µs) by Class::MOP::Method::Accessor::BEGIN@8 at line 8 of Class/MOP/Method/Accessor.pm
# once (23µs+1µs) by Plack::Middleware::StackTrace::BEGIN@7 at line 7 of Plack/Middleware/StackTrace.pm
# once (23µs+1µs) by Moose::Exporter::BEGIN@11 at line 11 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 (22µs+1µs) by Moose::Meta::TypeConstraint::Parameterizable::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint/Parameterizable.pm
# once (23µs+1µs) by Moose::Meta::TypeConstraint::BEGIN@16 at line 16 of Moose/Meta/TypeConstraint.pm
# once (23µs+1µs) by IO::File::BEGIN@11 at line 11 of IO/File.pm
# once (21µs+3µs) by Test::PONAPI::Repository::MockDB::Loader::BEGIN@14 at line 14 of lib/Test/PONAPI/Repository/MockDB/Loader.pm
# once (22µs+1µs) by Moose::Meta::Method::Accessor::BEGIN@7 at line 7 of Moose/Meta/Method/Accessor.pm
# once (22µs+1µs) by IO::File::BEGIN@9 at line 9 of IO/File.pm
# once (23µs+800ns) by Moose::BEGIN@10 at line 10 of Moose.pm
# once (22µs+1µs) by IO::BEGIN@6 at line 6 of IO.pm
# once (22µs+900ns) by Class::MOP::Overload::BEGIN@9 at line 9 of Class/MOP/Overload.pm
# once (22µs+800ns) by Eval::Closure::BEGIN@18 at line 18 of Eval/Closure.pm
# once (22µs+800ns) by Moose::Util::TypeConstraints::Builtins::BEGIN@9 at line 9 of Moose/Util/TypeConstraints/Builtins.pm
# once (22µs+1µs) by Moose::Meta::TypeConstraint::DuckType::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/DuckType.pm
# once (22µs+1µs) by Try::Tiny::BEGIN@1 at line 1 of (eval 20)[Try/Tiny.pm:18]
# once (22µs+0s) by Moose::Meta::TypeConstraint::Enum::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Enum.pm
# once (21µs+1µs) by Class::MOP::Overload::BEGIN@8 at line 8 of Class/MOP/Overload.pm
# once (21µs+900ns) by SelectSaver::BEGIN@7 at line 7 of SelectSaver.pm
# once (21µs+1µs) by Moose::Meta::Method::Destructor::BEGIN@8 at line 8 of Moose/Meta/Method/Destructor.pm
# once (22µs+0s) by IO::Socket::INET::BEGIN@14 at line 14 of IO/Socket/INET.pm
# once (21µs+800ns) by Moose::Meta::Class::BEGIN@10 at line 10 of Moose/Meta/Class.pm
# once (21µs+900ns) by File::Temp::BEGIN@149 at line 149 of File/Temp.pm
# once (21µs+700ns) by Class::MOP::Mixin::AttributeCore::BEGIN@7 at line 7 of Class/MOP/Mixin/AttributeCore.pm
# once (21µs+800ns) by Class::MOP::Class::BEGIN@17 at line 17 of Class/MOP/Class.pm
# once (20µs+900ns) by Return::MultiLevel::BEGIN@8 at line 8 of Return/MultiLevel.pm
# once (21µs+0s) by Cwd::BEGIN@4 at line 4 of Cwd.pm
# once (20µs+900ns) by Class::MOP::Package::BEGIN@7 at line 7 of Class/MOP/Package.pm
# once (20µs+900ns) by Class::MOP::Method::Wrapped::BEGIN@7 at line 7 of Class/MOP/Method/Wrapped.pm
# once (20µs+700ns) by Package::DeprecationManager::BEGIN@9 at line 9 of Package/DeprecationManager.pm
# once (20µs+600ns) by Moose::Meta::Role::Application::RoleSummation::BEGIN@9 at line 9 of Moose/Meta/Role/Application/RoleSummation.pm
# once (20µs+800ns) by Class::MOP::Method::Meta::BEGIN@7 at line 7 of Class/MOP/Method/Meta.pm
# once (20µs+800ns) by Class::MOP::Class::BEGIN@13 at line 13 of Class/MOP/Class.pm
# once (20µs+700ns) by HTTP::Headers::ActionPack::BEGIN@14 at line 14 of HTTP/Headers/ActionPack.pm
# once (20µs+900ns) by Moose::Exporter::BEGIN@7 at line 7 of Moose/Exporter.pm
# once (20µs+0s) by Plack::Util::BEGIN@4 at line 4 of Plack/Util.pm
# once (20µs+800ns) by Moose::Meta::Role::Attribute::BEGIN@8 at line 8 of Moose/Meta/Role/Attribute.pm
# once (20µs+800ns) by Moose::Meta::Role::Application::ToClass::BEGIN@10 at line 10 of Moose/Meta/Role/Application/ToClass.pm
# once (20µs+0s) by Path::Class::BEGIN@16 at line 16 of Path/Class.pm
# once (19µs+800ns) by Class::MOP::Method::Meta::BEGIN@8 at line 8 of Class/MOP/Method/Meta.pm
# once (20µs+0s) by HTTP::Headers::ActionPack::Util::BEGIN@15 at line 15 of HTTP/Headers/ActionPack/Util.pm
# once (19µs+700ns) by Moose::Util::MetaRole::BEGIN@6 at line 6 of Moose/Util/MetaRole.pm
# once (19µs+800ns) by Moose::Meta::TypeCoercion::Union::BEGIN@8 at line 8 of Moose/Meta/TypeCoercion/Union.pm
# once (19µs+900ns) by Moose::Util::TypeConstraints::BEGIN@5 at line 5 of Moose/Util/TypeConstraints.pm
# once (19µs+600ns) by Moose::Meta::Class::BEGIN@11 at line 11 of Moose/Meta/Class.pm
# once (19µs+800ns) by Class::MOP::Mixin::BEGIN@7 at line 7 of Class/MOP/Mixin.pm
# once (19µs+800ns) by Moose::Meta::TypeConstraint::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint.pm
# once (19µs+800ns) by File::Temp::BEGIN@151 at line 151 of File/Temp.pm
# once (20µs+0s) by Module::Pluggable::Object::BEGIN@8 at line 8 of Module/Pluggable/Object.pm
# once (18µs+800ns) by Class::MOP::Mixin::HasOverloads::BEGIN@11 at line 11 of Class/MOP/Mixin/HasOverloads.pm
# once (18µs+800ns) by Class::MOP::Mixin::HasAttributes::BEGIN@7 at line 7 of Class/MOP/Mixin/HasAttributes.pm
# once (19µs+0s) by Test::PONAPI::Repository::MockDB::Loader::BEGIN@6 at line 6 of lib/Test/PONAPI/Repository/MockDB/Loader.pm
# once (18µs+600ns) by Class::MOP::Method::Wrapped::BEGIN@8 at line 8 of Class/MOP/Method/Wrapped.pm
# once (18µs+800ns) by Moose::Exporter::BEGIN@13 at line 13 of Moose/Exporter.pm
# once (18µs+700ns) by Devel::OverloadInfo::BEGIN@17 at line 17 of Devel/OverloadInfo.pm
# once (18µs+700ns) by Moose::Meta::Method::Accessor::Native::BEGIN@8 at line 8 of Moose/Meta/Method/Accessor/Native.pm
# once (17µs+700ns) by Moose::Util::BEGIN@9 at line 9 of Moose/Util.pm
# once (17µs+800ns) by Class::MOP::Method::Inlined::BEGIN@7 at line 7 of Class/MOP/Method/Inlined.pm
# once (17µs+600ns) by Class::MOP::Mixin::HasOverloads::BEGIN@10 at line 10 of Class/MOP/Mixin/HasOverloads.pm
# once (17µs+700ns) by Class::MOP::Object::BEGIN@8 at line 8 of Class/MOP/Object.pm
# once (17µs+700ns) by Moose::Util::BEGIN@11 at line 11 of Moose/Util.pm
# once (18µs+0s) by Moose::Meta::TypeConstraint::DuckType::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/DuckType.pm
# once (17µs+600ns) by Class::MOP::Class::BEGIN@15 at line 15 of Class/MOP/Class.pm
# once (16µs+700ns) by Moose::Meta::Role::Application::ToInstance::BEGIN@10 at line 10 of Moose/Meta/Role/Application/ToInstance.pm
# once (16µs+600ns) by Eval::Closure::BEGIN@17 at line 17 of Eval/Closure.pm
# once (16µs+0s) by Moose::Meta::TypeConstraint::Class::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Class.pm
# once (16µs+600ns) by Moose::Meta::TypeConstraint::BEGIN@15 at line 15 of Moose/Meta/TypeConstraint.pm
# once (16µs+0s) by Getopt::Long::BEGIN@25 at line 25 of Getopt/Long.pm
# once (15µs+600ns) by Class::MOP::Class::BEGIN@16 at line 16 of Class/MOP/Class.pm
# once (15µs+0s) by Devel::StackTrace::AsHTML::BEGIN@9 at line 9 of Devel/StackTrace/AsHTML.pm
# once (15µs+0s) by Moose::Meta::TypeConstraint::Role::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Role.pm
# once (15µs+0s) by Plack::Util::BEGIN@5 at line 5 of Plack/Util.pm
# once (14µs+0s) by Params::Validate::BEGIN@11 at line 11 of Params/Validate.pm
# once (14µs+0s) by JSON::XS::BEGIN@121 at line 121 of JSON/XS.pm
# once (14µs+0s) by Class::Load::XS::BEGIN@11 at line 11 of Class/Load/XS.pm
# once (13µs+0s) by IO::Socket::BEGIN@11 at line 11 of IO/Socket.pm
# once (12µs+0s) by Sub::Identify::BEGIN@4 at line 4 of Sub/Identify.pm
# once (12µs+0s) by File::Temp::BEGIN@150 at line 150 of File/Temp.pm
# once (11µs+0s) by IO::Dir::BEGIN@14 at line 14 of IO/Dir.pm
# once (11µs+0s) by IO::Socket::BEGIN@16 at line 16 of IO/Socket.pm
# once (10µs+0s) by IO::Socket::INET::BEGIN@15 at line 15 of IO/Socket/INET.pm
# once (9µs+0s) by IO::Socket::BEGIN@17 at line 17 of IO/Socket.pm
# once (6µs+0s) by Try::Tiny::BEGIN@12 at line 12 of Try/Tiny.pm
# once (6µs+0s) by Devel::OverloadInfo::BEGIN@22 at line 22 of Devel/OverloadInfo.pm
# once (6µs+0s) by Eval::Closure::BEGIN@12 at line 12 of Eval/Closure.pm | ||||
29 | 253 | 110µs | my $pkg = shift; | ||
30 | 253 | 188µs | my $callpkg = caller($ExportLevel); | ||
31 | |||||
32 | 253 | 102µs | if ($pkg eq "Exporter" and @_ and $_[0] eq "import") { | ||
33 | 3 | 8µs | *{$callpkg."::import"} = \&import; | ||
34 | 3 | 10µs | return; | ||
35 | } | ||||
36 | |||||
37 | # We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-( | ||||
38 | 250 | 456µ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 | 250 | 312µs | my $fail = ${$pkg . '::'}{EXPORT_FAIL} && \@{"$pkg\::EXPORT_FAIL"}; | ||
42 | 250 | 171µs | return export $pkg, $callpkg, @_ | ||
43 | if $Verbose or $Debug or $fail && @$fail > 1; | ||||
44 | 250 | 206µs | my $export_cache = ($Cache{$pkg} ||= {}); | ||
45 | 250 | 323µs | my $args = @_ or @_ = @$exports; | ||
46 | |||||
47 | 250 | 89µs | if ($args and not %$export_cache) { | ||
48 | s/^&//, $export_cache->{$_} = 1 | ||||
49 | 28 | 2.54ms | 1725 | 297µs | foreach (@$exports, @{"$pkg\::EXPORT_OK"}); # spent 297µs making 1725 calls to Exporter::CORE:subst, avg 172ns/call |
50 | } | ||||
51 | 250 | 41µ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 | 250 | 133µ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 | 175 | 1.55ms | 578 | 246µs | foreach (@_); # spent 246µs making 578 calls to Exporter::CORE:match, avg 426ns/call |
58 | } else { | ||||
59 | ($heavy = /\W/) and last | ||||
60 | 75 | 969µs | 677 | 138µs | foreach (@_); # spent 138µs making 677 calls to Exporter::CORE:match, avg 204ns/call |
61 | } | ||||
62 | 250 | 118µs | 10 | 176µs | return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy; # spent 176µs making 10 calls to Exporter::export, avg 18µs/call |
63 | local $SIG{__WARN__} = | ||||
64 | 240 | 1.02ms | sub {require Carp; &Carp::carp} if not $SIG{__WARN__}; | ||
65 | # shortcut for the common case of no type character | ||||
66 | 240 | 3.97ms | *{"$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 5.29ms (4.03+1.27) within Exporter::export_to_level which was called 3 times, avg 1.76ms/call:
# 2 times (6µs+20µs) by Time::HiRes::import at line 63 of Time/HiRes.pm, avg 13µs/call
# once (4.02ms+1.25ms) by Class::Struct::import at line 54 of Class/Struct.pm | ||||
81 | 3 | 21µs | 6 | 1.54ms | goto &{as_heavy()}; # spent 1.27ms making 3 calls to Exporter::as_heavy, avg 422µs/call
# spent 269µs making 3 calls to Exporter::Heavy::heavy_export_to_level, avg 90µs/call |
82 | } | ||||
83 | |||||
84 | # spent 21µs (7+14) within Exporter::export_tags which was called:
# once (7µs+14µs) by Path::Class::Dir::BEGIN@14 at line 206 of File/Temp.pm | ||||
85 | 1 | 8µs | 2 | 34µs | goto &{as_heavy()}; # spent 20µs making 1 call to Exporter::Heavy::heavy_export_tags
# spent 14µs making 1 call to Exporter::as_heavy |
86 | } | ||||
87 | |||||
88 | # spent 18µs (6+13) within Exporter::export_ok_tags which was called:
# once (6µs+13µs) by DBI::BEGIN@179 at line 282 of DBI.pm | ||||
89 | 1 | 6µs | 2 | 46µs | goto &{as_heavy()}; # spent 34µs making 1 call to Exporter::Heavy::heavy_export_ok_tags
# spent 13µs making 1 call to Exporter::as_heavy |
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 |