← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:39:01 2010
Reported on Wed Nov 17 22:07:14 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/Exporter.pm
StatementsExecuted 2750 statements in 31.6ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1601579627.7ms35.4msExporter::::importExporter::import
1115.29ms5.63msExporter::::as_heavyExporter::as_heavy
227111.15ms1.15msExporter::::CORE:matchExporter::CORE:match (opcode)
11521321µs321µsExporter::::CORE:substExporter::CORE:subst (opcode)
11131µs5.66msExporter::::exportExporter::export
0000s0sExporter::::__ANON__[:65]Exporter::__ANON__[:65]
0000s0sExporter::::export_failExporter::export_fail
0000s0sExporter::::export_ok_tagsExporter::export_ok_tags
0000s0sExporter::::export_tagsExporter::export_tags
0000s0sExporter::::export_to_levelExporter::export_to_level
0000s0sExporter::::require_versionExporter::require_version
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Exporter;
2
3163µsrequire 5.006;
4
5# Be lean.
6#use strict;
7#no strict 'refs';
8
913µsour $Debug = 0;
1012µsour $ExportLevel = 0;
1112µsour $Verbose ||= 0;
1213µsour $VERSION = '5.63';
1312µsour (%Cache);
14
15# Carp 1.05+ does this now for us, but we may be running with an old Carp
1615µs$Carp::Internal{Exporter}++;
17
18
# spent 5.63ms (5.29+336µs) within Exporter::as_heavy which was called: # once (5.29ms+336µs) by Exporter::export at line 28
sub as_heavy {
191364µs require Exporter::Heavy;
20 # Unfortunately, this does not work if the caller is aliased as *name = \&foo
21 # Thus the need to create a lot of identical subroutines
22113µs my $c = (caller(1))[3];
23143µs117µs $c =~ s/.*:://;
# spent 17µs making 1 call to Exporter::CORE:subst
24129µs \&{"Exporter::Heavy::heavy_$c"};
25}
26
27
# spent 5.66ms (31µs+5.63) within Exporter::export which was called: # once (31µs+5.63ms) by Exporter::import at line 63
sub export {
28133µs26.20ms goto &{as_heavy()};
# spent 5.63ms making 1 call to Exporter::as_heavy # spent 572µs making 1 call to Exporter::Heavy::heavy_export
29}
30
31
# spent 35.4ms (27.7+7.69) within Exporter::import which was called 160 times, avg 221µs/call: # 4 times (602µs+28µs) by KiokuDB::BEGIN@19 or KiokuDB::Collapser::Buffer::BEGIN@4 or KiokuDB::LiveObjects::BEGIN@8 or MooseX::Clone::BEGIN@8 at line 28 of Hash/Util/FieldHash/Compat.pm, avg 157µs/call # once (212µs+6.26ms) by Hash::Util::FieldHash::Compat::BEGIN@10 at line 13 of Hash/Util/FieldHash/Compat.pm # once (635µs+9µs) by Moose::Meta::Method::Accessor::Native::Hash::count::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/count.pm # once (469µs+83µs) by Package::DeprecationManager::BEGIN@10 at line 10 of Package/DeprecationManager.pm # once (435µs+70µs) by Package::DeprecationManager::BEGIN@11 at line 11 of Package/DeprecationManager.pm # once (364µs+39µs) by Moose::BEGIN@11 at line 11 of Moose.pm # once (299µs+36µs) by Set::Object::Weak::BEGIN@32 at line 32 of Set/Object/Weak.pm # once (276µs+15µs) by Class::MOP::Class::BEGIN@14 at line 14 of Class/MOP/Class.pm # once (251µs+19µs) by Data::Visitor::BEGIN@6 at line 6 of Data/Visitor.pm # once (261µs+7µs) by Variable::Magic::BEGIN@8 at line 8 of Variable/Magic.pm # once (255µs+13µs) by KiokuDB::Role::UUIDs::BEGIN@6 at line 6 of KiokuDB/Role/UUIDs.pm # once (237µs+25µs) by KiokuDB::Linker::BEGIN@15 at line 15 of KiokuDB/Linker.pm # once (231µs+24µs) by Moose::BEGIN@12 at line 12 of Moose.pm # once (245µs+10µs) by Moose::Meta::Role::Attribute::BEGIN@8 at line 8 of Moose/Meta/Role/Attribute.pm # once (226µs+25µs) by Moose::Util::MetaRole::BEGIN@12 at line 12 of Moose/Util/MetaRole.pm # once (231µs+16µs) by Moose::Meta::Method::Constructor::BEGIN@8 at line 8 of Moose/Meta/Method/Constructor.pm # once (224µs+19µs) by namespace::clean::BEGIN@15 at line 15 of namespace/clean.pm # once (233µs+8µs) by Moose::Meta::Method::Accessor::Native::Hash::values::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/values.pm # once (225µs+10µs) by Try::Tiny::BEGIN@46 at line 46 of Try/Tiny.pm # once (223µs+10µs) by Class::MOP::Class::BEGIN@13 at line 13 of Class/MOP/Class.pm # once (214µs+12µs) by Moose::Exporter::BEGIN@12 at line 12 of Moose/Exporter.pm # once (211µs+12µs) by Class::MOP::Method::Inlined::BEGIN@7 at line 7 of Class/MOP/Method/Inlined.pm # once (206µs+13µs) by Class::MOP::BEGIN@14 at line 14 of Class/MOP.pm # once (209µs+8µs) by Class::MOP::Package::BEGIN@7 at line 7 of Class/MOP/Package.pm # once (203µs+11µs) by KiokuDB::LiveObjects::BEGIN@6 at line 6 of KiokuDB/LiveObjects.pm # once (198µs+13µs) by Devel::PartialDump::BEGIN@7 at line 7 of Devel/PartialDump.pm # once (195µs+14µs) by Carp::BEGIN@11 at line 11 of Carp/Heavy.pm # once (198µs+8µs) by Moose::Meta::Role::Application::ToInstance::BEGIN@7 at line 7 of Moose/Meta/Role/Application/ToInstance.pm # once (194µs+12µs) by Moose::Meta::Class::BEGIN@12 at line 12 of Moose/Meta/Class.pm # once (193µs+12µs) by Set::Object::BEGIN@498 at line 498 of Set/Object.pm # once (190µs+13µs) by Class::MOP::Class::BEGIN@17 at line 17 of Class/MOP/Class.pm # once (194µs+9µs) by KiokuDB::TypeMap::BEGIN@7 at line 7 of KiokuDB/TypeMap.pm # once (189µs+13µs) by KiokuDB::Backend::BEGIN@7 at line 7 of KiokuDB/Backend.pm # once (192µs+9µs) by metaclass::BEGIN@9 at line 9 of metaclass.pm # once (188µs+13µs) by Class::MOP::Mixin::HasMethods::BEGIN@14 at line 14 of Class/MOP/Mixin/HasMethods.pm # once (193µs+7µs) by Moose::Meta::Method::Accessor::Native::BEGIN@7 at line 7 of Moose/Meta/Method/Accessor/Native.pm # once (187µs+11µs) by Moose::Meta::TypeConstraint::BEGIN@13 at line 13 of Moose/Meta/TypeConstraint.pm # once (186µs+13µs) by Class::MOP::BEGIN@12 at line 12 of Class/MOP.pm # once (190µs+7µs) by KiokuDB::Linker::BEGIN@13 at line 13 of KiokuDB/Linker.pm # once (191µs+7µs) by Moose::Meta::Role::Composite::BEGIN@7 at line 7 of Moose/Meta/Role/Composite.pm # once (190µs+6µs) by Class::MOP::Class::BEGIN@15 at line 15 of Class/MOP/Class.pm # once (185µs+11µs) by Sub::Install::BEGIN@6 at line 6 of Sub/Install.pm # once (183µs+11µs) by Moose::Util::TypeConstraints::BEGIN@5 at line 5 of Moose/Util/TypeConstraints.pm # once (183µs+9µs) by Moose::Util::TypeConstraints::OptimizedConstraints::BEGIN@8 at line 8 of Moose/Util/TypeConstraints/OptimizedConstraints.pm # once (181µs+11µs) by Moose::Meta::Attribute::Native::Trait::BEGIN@5 at line 5 of Moose/Meta/Attribute/Native/Trait.pm # once (180µs+10µs) by Moose::Meta::Method::Destructor::BEGIN@8 at line 8 of Moose/Meta/Method/Destructor.pm # once (184µs+6µs) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@7 at line 7 of Moose/Meta/TypeConstraint/Parameterized.pm # once (177µs+10µs) by Class::MOP::Method::BEGIN@8 at line 8 of Class/MOP/Method.pm # once (178µs+9µs) by Class::MOP::Attribute::BEGIN@11 at line 11 of Class/MOP/Attribute.pm # once (176µs+10µs) by Moose::Meta::Role::Application::ToClass::BEGIN@8 at line 8 of Moose/Meta/Role/Application/ToClass.pm # once (176µs+10µs) by Moose::Meta::Attribute::BEGIN@8 at line 8 of Moose/Meta/Attribute.pm # once (180µs+5µs) by Tie::ToObject::BEGIN@10 at line 10 of Tie/ToObject.pm # once (175µs+9µs) by KiokuDB::BEGIN@21 at line 21 of KiokuDB.pm # once (173µs+10µs) by Class::MOP::Instance::BEGIN@7 at line 7 of Class/MOP/Instance.pm # once (176µs+8µs) by Moose::Meta::TypeConstraint::Role::BEGIN@7 at line 7 of Moose/Meta/TypeConstraint/Role.pm # once (174µs+8µs) by Moose::Meta::Method::Accessor::Native::Hash::is_empty::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm # once (171µs+10µs) by KiokuDB::Collapser::BEGIN@10 at line 10 of KiokuDB/Collapser.pm # once (171µs+8µs) by Class::MOP::Method::Meta::BEGIN@7 at line 7 of Class/MOP/Method/Meta.pm # once (171µs+9µs) by Moose::Meta::Attribute::BEGIN@10 at line 10 of Moose/Meta/Attribute.pm # once (170µs+7µs) by Moose::Meta::Role::Attribute::BEGIN@6 at line 6 of Moose/Meta/Role/Attribute.pm # once (166µs+8µs) by Class::MOP::Attribute::BEGIN@9 at line 9 of Class/MOP/Attribute.pm # once (165µs+7µs) by Moose::Meta::Method::Accessor::Native::Hash::elements::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/elements.pm # once (164µs+7µs) by KiokuDB::TypeMap::BEGIN@6 at line 6 of KiokuDB/TypeMap.pm # once (163µs+7µs) by Moose::Meta::Object::Trait::BEGIN@4 at line 4 of Moose/Meta/Object/Trait.pm # once (164µs+7µs) by Moose::Meta::Method::Accessor::Native::Writer::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Writer.pm # once (163µs+7µs) by Moose::Meta::Method::Accessor::Native::Hash::get::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/get.pm # once (162µs+8µs) by Moose::Meta::Method::Accessor::Native::Hash::keys::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/keys.pm # once (162µs+7µs) by MooseX::Clone::Meta::Attribute::Trait::Clone::BEGIN@6 at line 6 of MooseX/Clone/Meta/Attribute/Trait/Clone.pm # once (165µs+4µs) by Moose::Meta::Role::BEGIN@9 at line 9 of Moose/Meta/Role.pm # once (163µs+6µs) by Class::MOP::Method::BEGIN@7 at line 7 of Class/MOP/Method.pm # once (160µs+7µs) by Moose::Meta::Method::Accessor::Native::Hash::defined::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/defined.pm # once (161µs+7µs) by Moose::Meta::Role::Application::ToRole::BEGIN@7 at line 7 of Moose/Meta/Role/Application/ToRole.pm # once (159µs+8µs) by Moose::Meta::Method::Accessor::Native::Hash::kv::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/kv.pm # once (159µs+7µs) by Moose::Meta::Method::Accessor::Native::Hash::exists::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/exists.pm # once (159µs+8µs) by Moose::Util::BEGIN@11 at line 11 of Moose/Util.pm # once (159µs+8µs) by KiokuDB::LiveObjects::TXNScope::BEGIN@6 at line 6 of KiokuDB/LiveObjects/TXNScope.pm # once (159µs+8µs) by Moose::Exporter::BEGIN@14 at line 14 of Moose/Exporter.pm # once (160µs+7µs) by Moose::Meta::Role::Application::RoleSummation::BEGIN@7 at line 7 of Moose/Meta/Role/Application/RoleSummation.pm # once (158µs+8µs) by MooseX::Clone::Meta::Attribute::Trait::StrableClone::BEGIN@6 at line 6 of MooseX/Clone/Meta/Attribute/Trait/StorableClone.pm # once (158µs+7µs) by MooseX::Clone::Meta::Attribute::Trait::Copy::BEGIN@6 at line 6 of MooseX/Clone/Meta/Attribute/Trait/Copy.pm # once (158µs+7µs) by Moose::Meta::Method::Delegation::BEGIN@8 at line 8 of Moose/Meta/Method/Delegation.pm # once (158µs+7µs) by KiokuDB::TypeMap::Resolver::BEGIN@6 at line 6 of KiokuDB/TypeMap/Resolver.pm # once (159µs+7µs) by Moose::Meta::Method::Accessor::Native::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native.pm # once (157µs+8µs) by Moose::Meta::Method::Accessor::Native::Array::BEGIN@8 at line 8 of Moose/Meta/Method/Accessor/Native/Array.pm # once (158µs+6µs) by Class::MOP::Module::BEGIN@7 at line 7 of Class/MOP/Module.pm # once (157µs+7µs) by KiokuDB::TypeMap::Entry::MOP::BEGIN@6 at line 6 of KiokuDB/TypeMap/Entry/MOP.pm # once (157µs+7µs) by Class::MOP::Method::Accessor::BEGIN@8 at line 8 of Class/MOP/Method/Accessor.pm # once (156µs+7µs) by Moose::Meta::Class::Immutable::Trait::BEGIN@7 at line 7 of Moose/Meta/Class/Immutable/Trait.pm # once (156µs+8µs) by Class::MOP::Mixin::HasMethods::BEGIN@12 at line 12 of Class/MOP/Mixin/HasMethods.pm # once (156µs+8µs) by Moose::Meta::Method::Delegation::BEGIN@7 at line 7 of Moose/Meta/Method/Delegation.pm # once (155µs+8µs) by Moose::Meta::Class::BEGIN@9 at line 9 of Moose/Meta/Class.pm # once (155µs+7µs) by Moose::Meta::TypeConstraint::Registry::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Registry.pm # once (154µs+7µs) by Class::MOP::Method::Constructor::BEGIN@8 at line 8 of Class/MOP/Method/Constructor.pm # once (155µs+6µs) by Moose::Meta::TypeCoercion::Union::BEGIN@8 at line 8 of Moose/Meta/TypeCoercion/Union.pm # once (155µs+6µs) by Moose::Meta::TypeConstraint::DuckType::BEGIN@7 at line 7 of Moose/Meta/TypeConstraint/DuckType.pm # once (154µs+7µs) by KiokuDB::Collapser::BEGIN@20 at line 20 of KiokuDB/Collapser.pm # once (154µs+7µs) by Moose::Meta::Role::BEGIN@8 at line 8 of Moose/Meta/Role.pm # once (154µs+6µs) by Moose::Meta::Method::Accessor::Native::Hash::set::BEGIN@7 at line 7 of Moose/Meta/Method/Accessor/Native/Hash/set.pm # once (153µs+7µs) by Moose::Role::BEGIN@5 at line 5 of Moose/Role.pm # once (154µs+6µs) by Moose::Meta::TypeConstraint::Class::BEGIN@7 at line 7 of Moose/Meta/TypeConstraint/Class.pm # once (152µs+7µs) by KiokuDB::Linker::BEGIN@14 at line 14 of KiokuDB/Linker.pm # once (151µs+7µs) by Class::MOP::BEGIN@11 at line 11 of Class/MOP.pm # once (152µs+7µs) by Moose::Exporter::BEGIN@16 at line 16 of Moose/Exporter.pm # once (151µs+8µs) by Hash::Util::FieldHash::BEGIN@6 at line 6 of Hash/Util/FieldHash.pm # once (151µs+7µs) by Class::MOP::Method::Constructor::BEGIN@7 at line 7 of Class/MOP/Method/Constructor.pm # once (151µs+7µs) by Class::MOP::Method::Wrapped::BEGIN@7 at line 7 of Class/MOP/Method/Wrapped.pm # once (151µs+7µs) by Class::MOP::Class::Immutable::Trait::BEGIN@9 at line 9 of Class/MOP/Class/Immutable/Trait.pm # once (151µs+7µs) by Class::MOP::Attribute::BEGIN@10 at line 10 of Class/MOP/Attribute.pm # once (151µs+7µs) by Class::MOP::Method::Accessor::BEGIN@7 at line 7 of Class/MOP/Method/Accessor.pm # once (151µs+7µs) by Scope::Guard::BEGIN@6 at line 6 of Scope/Guard.pm # once (151µs+7µs) by Moose::Util::TypeConstraints::BEGIN@6 at line 6 of Moose/Util/TypeConstraints.pm # once (150µs+7µs) by Moose::Meta::TypeConstraint::Union::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint/Union.pm # once (151µs+6µs) by Class::MOP::Class::Immutable::Trait::BEGIN@8 at line 8 of Class/MOP/Class/Immutable/Trait.pm # once (150µs+7µs) by Class::MOP::Method::Inlined::BEGIN@6 at line 6 of Class/MOP/Method/Inlined.pm # once (149µs+7µs) by metaclass::BEGIN@7 at line 7 of metaclass.pm # once (149µs+7µs) by Class::MOP::Mixin::BEGIN@10 at line 10 of Class/MOP/Mixin.pm # once (149µs+7µs) by Moose::Util::MetaRole::BEGIN@5 at line 5 of Moose/Util/MetaRole.pm # once (149µs+7µs) by Class::MOP::Mixin::HasAttributes::BEGIN@10 at line 10 of Class/MOP/Mixin/HasAttributes.pm # once (148µs+8µs) by Class::MOP::Package::BEGIN@80 at line 80 of Class/MOP/Deprecated.pm # once (148µs+7µs) by Moose::Util::BEGIN@7 at line 7 of Moose/Util.pm # once (147µs+7µs) by Moose::Meta::Class::BEGIN@13 at line 13 of Moose/Meta/Class.pm # once (148µs+6µs) by Class::MOP::Mixin::AttributeCore::BEGIN@10 at line 10 of Class/MOP/Mixin/AttributeCore.pm # once (147µs+6µs) by Class::MOP::Object::BEGIN@7 at line 7 of Class/MOP/Object.pm # once (146µs+7µs) by Package::DeprecationManager::BEGIN@9 at line 9 of Package/DeprecationManager.pm # once (146µs+6µs) by KiokuDB::LiveObjects::Guard::BEGIN@6 at line 6 of KiokuDB/LiveObjects/Guard.pm # once (147µs+5µs) by namespace::clean::BEGIN@14 at line 14 of namespace/clean.pm # once (145µs+6µs) by Moose::Util::BEGIN@9 at line 9 of Moose/Util.pm # once (145µs+6µs) by Class::MOP::Method::Generated::BEGIN@7 at line 7 of Class/MOP/Method/Generated.pm # once (142µs+7µs) by KiokuDB::Collapser::BEGIN@9 at line 9 of KiokuDB/Collapser.pm # once (146µs+0s) by B::Hooks::EndOfScope::BEGIN@14 at line 14 of B/Hooks/EndOfScope.pm # once (139µs+6µs) by Package::Stash::BEGIN@9 at line 9 of Package/Stash.pm # once (140µs+4µs) by metaclass::BEGIN@8 at line 8 of metaclass.pm # once (135µs+5µs) by Class::MOP::Class::BEGIN@18 at line 18 of Class/MOP/Class.pm # once (133µs+5µs) by Tie::ToObject::BEGIN@11 at line 11 of Tie/ToObject.pm # once (130µs+4µs) by Moose::Util::MetaRole::BEGIN@11 at line 11 of Moose/Util/MetaRole.pm # once (127µs+4µs) by Moose::Meta::TypeConstraint::DuckType::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/DuckType.pm # once (127µs+4µs) by Moose::Meta::TypeConstraint::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint.pm # once (127µs+4µs) by KiokuDB::BEGIN@20 at line 20 of KiokuDB.pm # once (125µs+4µs) by Moose::Meta::Role::Attribute::BEGIN@7 at line 7 of Moose/Meta/Role/Attribute.pm # once (124µs+4µs) by Class::MOP::Mixin::HasAttributes::BEGIN@11 at line 11 of Class/MOP/Mixin/HasAttributes.pm # once (124µs+4µs) by Moose::Meta::Class::BEGIN@11 at line 11 of Moose/Meta/Class.pm # once (124µs+4µs) by Class::MOP::Package::BEGIN@8 at line 8 of Class/MOP/Package.pm # once (124µs+4µs) by Class::MOP::Method::Wrapped::BEGIN@8 at line 8 of Class/MOP/Method/Wrapped.pm # once (124µs+4µs) by Class::MOP::Method::Meta::BEGIN@8 at line 8 of Class/MOP/Method/Meta.pm # once (124µs+4µs) by KiokuDB::TypeMap::Entry::MOP::BEGIN@7 at line 7 of KiokuDB/TypeMap/Entry/MOP.pm # once (123µs+4µs) by Moose::Meta::Attribute::BEGIN@9 at line 9 of Moose/Meta/Attribute.pm # once (123µs+4µs) by KiokuDB::LiveObjects::BEGIN@9 at line 9 of KiokuDB/LiveObjects.pm # once (122µs+4µs) by Class::MOP::Mixin::HasMethods::BEGIN@13 at line 13 of Class/MOP/Mixin/HasMethods.pm # once (122µs+4µs) by Class::MOP::Module::BEGIN@8 at line 8 of Class/MOP/Module.pm # once (122µs+4µs) by Moose::Role::BEGIN@6 at line 6 of Moose/Role.pm # once (124µs+0s) by Sub::Identify::BEGIN@4 at line 4 of Sub/Identify.pm # once (120µs+4µs) by Class::MOP::Object::BEGIN@8 at line 8 of Class/MOP/Object.pm # once (118µs+4µs) by Moose::Util::BEGIN@10 at line 10 of Moose/Util.pm # once (118µs+4µs) by Package::Stash::BEGIN@10 at line 10 of Package/Stash.pm # once (107µs+0s) by KiokuDB::Collapser::BEGIN@8 at line 8 of KiokuDB/Collapser.pm # once (103µs+0s) by KiokuDB::Collapser::Buffer::BEGIN@5 at line 5 of KiokuDB/Collapser/Buffer.pm # once (101µs+0s) by KiokuDB::LiveObjects::BEGIN@11 at line 11 of KiokuDB/LiveObjects.pm
sub import {
32160751µs my $pkg = shift;
33160718µs my $callpkg = caller($ExportLevel);
34
35160470µs if ($pkg eq "Exporter" and @_ and $_[0] eq "import") {
36 *{$callpkg."::import"} = \&import;
37 return;
38 }
39
40 # We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-(
411602.23ms my($exports, $fail) = (\@{"$pkg\::EXPORT"}, \@{"$pkg\::EXPORT_FAIL"});
42160645µs return export $pkg, $callpkg, @_
43 if $Verbose or $Debug or @$fail > 1;
44160689µs my $export_cache = ($Cache{$pkg} ||= {});
45160565µs my $args = @_ or @_ = @$exports;
46
47160363µs local $_;
481601.09ms if ($args and not %$export_cache) {
49 s/^&//, $export_cache->{$_} = 1
50201.71ms114304µs foreach (@$exports, @{"$pkg\::EXPORT_OK"});
# spent 304µs making 114 calls to Exporter::CORE:subst, avg 3µs/call
51 }
52160317µs my $heavy;
53 # Try very hard not to use {} and hence have to enter scope on the foreach
54 # We bomb out of the loop with last as soon as heavy is set.
55160779µs if ($args or $fail) {
56 ($heavy = (/\W/ or $args and not exists $export_cache->{$_}
57 or @$fail and $_ eq $fail->[0])) and last
583206.43ms2271.15ms foreach (@_);
# spent 1.15ms making 227 calls to Exporter::CORE:match, avg 5µs/call
59 } else {
60 ($heavy = /\W/) and last
61 foreach (@_);
62 }
63160305µs15.66ms return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
# spent 5.66ms making 1 call to Exporter::export
64 local $SIG{__WARN__} =
651593.95ms sub {require Carp; &Carp::carp};
66 # shortcut for the common case of no type character
673189.98ms *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;
68}
69
70# Default methods
71
72sub export_fail {
73 my $self = shift;
74 @_;
75}
76
77# Unfortunately, caller(1)[3] "does not work" if the caller is aliased as
78# *name = \&foo. Thus the need to create a lot of identical subroutines
79# Otherwise we could have aliased them to export().
80
81sub export_to_level {
82 goto &{as_heavy()};
83}
84
85sub export_tags {
86 goto &{as_heavy()};
87}
88
89sub export_ok_tags {
90 goto &{as_heavy()};
91}
92
93sub require_version {
94 goto &{as_heavy()};
95}
96
97117µs1;
98__END__
 
# spent 1.15ms within Exporter::CORE:match which was called 227 times, avg 5µs/call: # 227 times (1.15ms+0s) by Exporter::import at line 58, avg 5µs/call
sub Exporter::CORE:match; # opcode
# spent 321µs within Exporter::CORE:subst which was called 115 times, avg 3µs/call: # 114 times (304µs+0s) by Exporter::import at line 50, avg 3µs/call # once (17µs+0s) by Exporter::as_heavy at line 23
sub Exporter::CORE:subst; # opcode