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

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/Exporter.pm
StatementsExecuted 2767 statements in 30.8ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1611589027.0ms34.9msExporter::::importExporter::import
1115.39ms5.73msExporter::::as_heavyExporter::as_heavy
243111.23ms1.23msExporter::::CORE:matchExporter::CORE:match (opcode)
11521317µs317µsExporter::::CORE:substExporter::CORE:subst (opcode)
11129µs5.76msExporter::::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
3161µ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.73ms (5.39+344µs) within Exporter::as_heavy which was called: # once (5.39ms+344µs) by Exporter::export at line 28
sub as_heavy {
194532µ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
22 my $c = (caller(1))[3];
23118µs $c =~ s/.*:://;
# spent 18µs making 1 call to Exporter::CORE:subst
24 \&{"Exporter::Heavy::heavy_$c"};
25}
26
27
# spent 5.76ms (29µs+5.73) within Exporter::export which was called: # once (29µs+5.73ms) by Exporter::import at line 63
sub export {
28133µs26.31ms goto &{as_heavy()};
# spent 5.73ms making 1 call to Exporter::as_heavy # spent 576µs making 1 call to Exporter::Heavy::heavy_export
29}
30
31
# spent 34.9ms (27.0+7.86) within Exporter::import which was called 161 times, avg 217µs/call: # 4 times (636µs+30µ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 166µs/call # once (213µs+6.36ms) by Hash::Util::FieldHash::Compat::BEGIN@10 at line 13 of Hash/Util/FieldHash/Compat.pm # once (463µs+81µs) by Package::DeprecationManager::BEGIN@10 at line 10 of Package/DeprecationManager.pm # once (436µs+67µs) by Package::DeprecationManager::BEGIN@11 at line 11 of Package/DeprecationManager.pm # once (324µs+37µs) by Moose::BEGIN@11 at line 11 of Moose.pm # once (286µs+36µs) by Set::Object::Weak::BEGIN@32 at line 32 of Set/Object/Weak.pm # once (260µs+14µs) by Moose::Util::TypeConstraints::BEGIN@5 at line 5 of Moose/Util/TypeConstraints.pm # once (249µs+19µs) by Data::Visitor::BEGIN@6 at line 6 of Data/Visitor.pm # once (239µs+27µs) by Moose::Util::MetaRole::BEGIN@12 at line 12 of Moose/Util/MetaRole.pm # once (240µs+23µs) by KiokuDB::Linker::BEGIN@15 at line 15 of KiokuDB/Linker.pm # once (246µs+12µs) by Moose::Util::TypeConstraints::BEGIN@6 at line 6 of Moose/Util/TypeConstraints.pm # once (231µs+25µs) by Moose::BEGIN@12 at line 12 of Moose.pm # once (235µs+15µs) by Moose::Meta::Method::Constructor::BEGIN@8 at line 8 of Moose/Meta/Method/Constructor.pm # once (223µs+19µs) by namespace::clean::BEGIN@15 at line 15 of namespace/clean.pm # once (232µs+8µs) by Eval::Closure::BEGIN@15 at line 15 of Eval/Closure.pm # once (228µs+10µs) by Moose::Util::TypeConstraints::OptimizedConstraints::BEGIN@8 at line 8 of Moose/Util/TypeConstraints/OptimizedConstraints.pm # once (224µs+12µs) by Class::MOP::BEGIN@14 at line 14 of Class/MOP.pm # once (211µs+14µs) by KiokuDB::Backend::BEGIN@7 at line 7 of KiokuDB/Backend.pm # once (207µs+12µs) by Moose::Meta::Class::BEGIN@12 at line 12 of Moose/Meta/Class.pm # once (203µs+13µs) by KiokuDB::Role::UUIDs::BEGIN@6 at line 6 of KiokuDB/Role/UUIDs.pm # once (202µs+14µs) by Devel::PartialDump::BEGIN@7 at line 7 of Devel/PartialDump.pm # once (205µs+10µs) by Class::MOP::Method::Constructor::BEGIN@9 at line 9 of Class/MOP/Method/Constructor.pm # once (201µs+13µs) by Try::Tiny::BEGIN@46 at line 46 of Try/Tiny.pm # once (196µs+14µs) by Class::MOP::Mixin::HasMethods::BEGIN@14 at line 14 of Class/MOP/Mixin/HasMethods.pm # once (197µs+12µs) by Moose::Meta::Method::Accessor::BEGIN@7 at line 7 of Moose/Meta/Method/Accessor.pm # once (194µs+12µs) by Memoize::BEGIN@27 at line 27 of Memoize.pm # once (193µs+13µs) by Eval::Closure::BEGIN@13 at line 13 of Eval/Closure.pm # once (192µs+13µs) by Class::MOP::Class::BEGIN@17 at line 17 of Class/MOP/Class.pm # once (191µs+13µs) by Class::MOP::Method::Inlined::BEGIN@7 at line 7 of Class/MOP/Method/Inlined.pm # once (191µs+12µs) by Set::Object::BEGIN@498 at line 498 of Set/Object.pm # once (157µs+45µs) by Moose::Meta::Method::Accessor::Native::Hash::values::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/values.pm # once (187µs+14µs) by Carp::BEGIN@11 at line 11 of Carp/Heavy.pm # once (193µs+8µs) by Moose::Meta::Class::BEGIN@13 at line 13 of Moose/Meta/Class.pm # once (189µs+12µs) by Sub::Install::BEGIN@6 at line 6 of Sub/Install.pm # once (190µs+7µs) by Moose::Util::BEGIN@7 at line 7 of Moose/Util.pm # once (186µs+11µs) by Moose::Exporter::BEGIN@12 at line 12 of Moose/Exporter.pm # once (184µs+12µs) by Class::MOP::BEGIN@12 at line 12 of Class/MOP.pm # once (184µs+11µs) by Moose::Meta::TypeConstraint::BEGIN@13 at line 13 of Moose/Meta/TypeConstraint.pm # once (183µs+11µs) by Moose::Meta::Attribute::Native::Trait::BEGIN@5 at line 5 of Moose/Meta/Attribute/Native/Trait.pm # once (185µs+8µs) by Moose::Meta::Method::Delegation::BEGIN@7 at line 7 of Moose/Meta/Method/Delegation.pm # once (180µs+11µs) by KiokuDB::LiveObjects::BEGIN@6 at line 6 of KiokuDB/LiveObjects.pm # once (180µs+10µs) by Moose::Meta::Method::Destructor::BEGIN@8 at line 8 of Moose/Meta/Method/Destructor.pm # once (179µs+10µs) by Moose::Meta::Attribute::BEGIN@8 at line 8 of Moose/Meta/Attribute.pm # once (181µs+7µs) by Class::MOP::Method::Accessor::BEGIN@8 at line 8 of Class/MOP/Method/Accessor.pm # once (181µs+7µs) by Moose::Util::BEGIN@11 at line 11 of Moose/Util.pm # once (181µs+7µs) by Class::MOP::Method::BEGIN@7 at line 7 of Class/MOP/Method.pm # once (177µs+10µs) by KiokuDB::BEGIN@21 at line 21 of KiokuDB.pm # once (178µs+7µs) by Moose::Meta::Method::Accessor::Native::Hash::keys::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Hash/keys.pm # once (175µs+10µs) by Class::MOP::Method::BEGIN@8 at line 8 of Class/MOP/Method.pm # once (174µs+10µs) by Moose::Meta::Role::Application::ToClass::BEGIN@8 at line 8 of Moose/Meta/Role/Application/ToClass.pm # once (173µs+10µs) by Class::MOP::Instance::BEGIN@7 at line 7 of Class/MOP/Instance.pm # once (173µs+8µs) by Class::MOP::Method::Constructor::BEGIN@7 at line 7 of Class/MOP/Method/Constructor.pm # once (172µs+9µs) by Eval::Closure::BEGIN@17 at line 17 of Eval/Closure.pm # once (170µs+10µs) by KiokuDB::TypeMap::BEGIN@7 at line 7 of KiokuDB/TypeMap.pm # once (171µs+8µs) by Class::MOP::Attribute::BEGIN@9 at line 9 of Class/MOP/Attribute.pm # once (172µs+7µs) by Moose::Meta::TypeConstraint::Union::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint/Union.pm # once (169µs+9µs) by Moose::Meta::Method::Destructor::BEGIN@9 at line 9 of Moose/Meta/Method/Destructor.pm # once (169µs+9µs) by Moose::Meta::Method::Constructor::BEGIN@9 at line 9 of Moose/Meta/Method/Constructor.pm # once (172µs+6µs) by Moose::Meta::TypeConstraint::Class::BEGIN@7 at line 7 of Moose/Meta/TypeConstraint/Class.pm # once (168µs+9µs) by Class::MOP::Class::BEGIN@14 at line 14 of Class/MOP/Class.pm # once (167µs+10µs) by Class::MOP::Method::Accessor::BEGIN@9 at line 9 of Class/MOP/Method/Accessor.pm # once (167µs+10µs) by KiokuDB::Collapser::BEGIN@10 at line 10 of KiokuDB/Collapser.pm # once (167µs+8µs) by Moose::Exporter::BEGIN@14 at line 14 of Moose/Exporter.pm # once (166µs+9µs) by Class::MOP::Package::BEGIN@7 at line 7 of Class/MOP/Package.pm # once (165µs+9µs) by Moose::Meta::Attribute::BEGIN@10 at line 10 of Moose/Meta/Attribute.pm # once (164µs+10µs) by metaclass::BEGIN@9 at line 9 of metaclass.pm # once (167µs+6µs) by Moose::Meta::Method::Accessor::Native::Writer::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native/Writer.pm # once (164µs+9µs) by Class::MOP::Attribute::BEGIN@11 at line 11 of Class/MOP/Attribute.pm # once (163µs+8µs) by KiokuDB::LiveObjects::TXNScope::BEGIN@6 at line 6 of KiokuDB/LiveObjects/TXNScope.pm # once (163µs+7µs) by Class::MOP::Mixin::BEGIN@10 at line 10 of Class/MOP/Mixin.pm # once (161µs+8µs) by MooseX::Clone::Meta::Attribute::Trait::Clone::BEGIN@6 at line 6 of MooseX/Clone/Meta/Attribute/Trait/Clone.pm # once (164µs+4µs) by Moose::Meta::Role::BEGIN@9 at line 9 of Moose/Meta/Role.pm # once (160µs+8µs) by Class::MOP::Package::BEGIN@80 at line 80 of Class/MOP/Deprecated.pm # once (161µs+7µs) by Moose::Meta::Role::Attribute::BEGIN@6 at line 6 of Moose/Meta/Role/Attribute.pm # once (160µs+7µs) by Moose::Meta::Object::Trait::BEGIN@4 at line 4 of Moose/Meta/Object/Trait.pm # once (159µs+7µs) by Class::MOP::Mixin::HasMethods::BEGIN@12 at line 12 of Class/MOP/Mixin/HasMethods.pm # once (160µs+6µs) by Moose::Meta::Role::Application::RoleSummation::BEGIN@7 at line 7 of Moose/Meta/Role/Application/RoleSummation.pm # once (158µs+7µs) by MooseX::Clone::Meta::Attribute::Trait::StrableClone::BEGIN@6 at line 6 of MooseX/Clone/Meta/Attribute/Trait/StorableClone.pm # once (159µs+6µs) by Moose::Util::BEGIN@9 at line 9 of Moose/Util.pm # once (157µs+8µs) by KiokuDB::Collapser::BEGIN@20 at line 20 of KiokuDB/Collapser.pm # once (157µs+8µs) by MooseX::Clone::Meta::Attribute::Trait::Copy::BEGIN@6 at line 6 of MooseX/Clone/Meta/Attribute/Trait/Copy.pm # once (158µs+6µs) by Moose::Meta::Role::Composite::BEGIN@7 at line 7 of Moose/Meta/Role/Composite.pm # once (158µs+6µs) by Moose::Meta::TypeConstraint::DuckType::BEGIN@7 at line 7 of Moose/Meta/TypeConstraint/DuckType.pm # once (158µs+6µs) by Moose::Meta::Role::Application::ToRole::BEGIN@7 at line 7 of Moose/Meta/Role/Application/ToRole.pm # once (156µs+7µs) by KiokuDB::TypeMap::Resolver::BEGIN@6 at line 6 of KiokuDB/TypeMap/Resolver.pm # once (156µs+7µs) by KiokuDB::TypeMap::Entry::MOP::BEGIN@6 at line 6 of KiokuDB/TypeMap/Entry/MOP.pm # once (157µs+6µs) by Moose::Meta::Role::Application::ToInstance::BEGIN@7 at line 7 of Moose/Meta/Role/Application/ToInstance.pm # once (156µs+6µs) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@7 at line 7 of Moose/Meta/TypeConstraint/Parameterized.pm # once (155µs+7µs) by Moose::Meta::Role::BEGIN@8 at line 8 of Moose/Meta/Role.pm # once (155µs+8µs) by Moose::Meta::Method::Accessor::Native::Array::BEGIN@8 at line 8 of Moose/Meta/Method/Accessor/Native/Array.pm # once (154µs+8µs) by Moose::Meta::Method::Delegation::BEGIN@8 at line 8 of Moose/Meta/Method/Delegation.pm # once (155µs+7µs) by Moose::Meta::Method::Accessor::Native::BEGIN@6 at line 6 of Moose/Meta/Method/Accessor/Native.pm # once (154µs+8µs) by KiokuDB::Linker::BEGIN@13 at line 13 of KiokuDB/Linker.pm # once (153µs+7µs) by KiokuDB::TypeMap::BEGIN@6 at line 6 of KiokuDB/TypeMap.pm # once (154µs+7µs) by Moose::Meta::Class::Immutable::Trait::BEGIN@7 at line 7 of Moose/Meta/Class/Immutable/Trait.pm # once (154µs+6µs) by Moose::Meta::TypeConstraint::Registry::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/Registry.pm # once (153µs+7µs) by Class::MOP::Method::Constructor::BEGIN@8 at line 8 of Class/MOP/Method/Constructor.pm # once (153µs+7µs) by Class::MOP::Class::Immutable::Trait::BEGIN@8 at line 8 of Class/MOP/Class/Immutable/Trait.pm # once (153µs+7µs) by Moose::Meta::TypeCoercion::Union::BEGIN@8 at line 8 of Moose/Meta/TypeCoercion/Union.pm # once (152µs+8µs) by Class::MOP::BEGIN@11 at line 11 of Class/MOP.pm # once (151µs+8µs) by Class::MOP::Class::BEGIN@13 at line 13 of Class/MOP/Class.pm # once (152µs+6µs) by Moose::Meta::TypeConstraint::Role::BEGIN@7 at line 7 of Moose/Meta/TypeConstraint/Role.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::MetaRole::BEGIN@5 at line 5 of Moose/Util/MetaRole.pm # once (151µs+8µs) by Moose::Meta::Class::BEGIN@9 at line 9 of Moose/Meta/Class.pm # once (151µs+7µs) by Moose::Meta::Role::Attribute::BEGIN@8 at line 8 of Moose/Meta/Role/Attribute.pm # once (151µs+7µs) by Class::MOP::Mixin::HasAttributes::BEGIN@10 at line 10 of Class/MOP/Mixin/HasAttributes.pm # once (151µs+7µs) by Class::MOP::Method::Meta::BEGIN@7 at line 7 of Class/MOP/Method/Meta.pm # once (151µs+7µs) by Class::MOP::Mixin::AttributeCore::BEGIN@10 at line 10 of Class/MOP/Mixin/AttributeCore.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 Moose::Meta::Method::Accessor::Native::BEGIN@7 at line 7 of Moose/Meta/Method/Accessor/Native.pm # once (150µs+7µs) by Class::MOP::Class::Immutable::Trait::BEGIN@9 at line 9 of Class/MOP/Class/Immutable/Trait.pm # once (150µs+7µs) by Class::MOP::Method::Wrapped::BEGIN@7 at line 7 of Class/MOP/Method/Wrapped.pm # once (150µs+7µs) by Moose::Exporter::BEGIN@16 at line 16 of Moose/Exporter.pm # once (149µs+7µs) by metaclass::BEGIN@7 at line 7 of metaclass.pm # once (149µs+7µs) by Hash::Util::FieldHash::BEGIN@6 at line 6 of Hash/Util/FieldHash.pm # once (149µs+7µs) by Moose::Role::BEGIN@5 at line 5 of Moose/Role.pm # once (147µs+8µs) by Class::MOP::Module::BEGIN@7 at line 7 of Class/MOP/Module.pm # once (148µs+7µs) by Class::MOP::Attribute::BEGIN@10 at line 10 of Class/MOP/Attribute.pm # once (150µs+4µs) by metaclass::BEGIN@8 at line 8 of metaclass.pm # once (147µs+7µs) by Variable::Magic::BEGIN@8 at line 8 of Variable/Magic.pm # once (147µs+7µs) by Class::MOP::Object::BEGIN@7 at line 7 of Class/MOP/Object.pm # once (145µs+7µs) by KiokuDB::Linker::BEGIN@14 at line 14 of KiokuDB/Linker.pm # once (147µs+6µs) by Class::MOP::Method::Inlined::BEGIN@6 at line 6 of Class/MOP/Method/Inlined.pm # once (144µs+7µs) by Package::DeprecationManager::BEGIN@9 at line 9 of Package/DeprecationManager.pm # once (147µs+4µs) by Tie::ToObject::BEGIN@10 at line 10 of Tie/ToObject.pm # once (146µs+5µs) by namespace::clean::BEGIN@14 at line 14 of namespace/clean.pm # once (144µs+6µs) by KiokuDB::LiveObjects::Guard::BEGIN@6 at line 6 of KiokuDB/LiveObjects/Guard.pm # once (143µs+6µs) by Class::MOP::Method::Generated::BEGIN@7 at line 7 of Class/MOP/Method/Generated.pm # once (136µs+7µs) by KiokuDB::Collapser::BEGIN@9 at line 9 of KiokuDB/Collapser.pm # once (137µs+4µs) by Class::MOP::Package::BEGIN@8 at line 8 of Class/MOP/Package.pm # once (132µs+5µs) by Class::MOP::Mixin::HasAttributes::BEGIN@11 at line 11 of Class/MOP/Mixin/HasAttributes.pm # once (130µs+5µs) by Moose::Meta::Class::BEGIN@11 at line 11 of Moose/Meta/Class.pm # once (131µs+4µs) by Moose::Util::MetaRole::BEGIN@11 at line 11 of Moose/Util/MetaRole.pm # once (128µs+4µs) by Eval::Closure::BEGIN@16 at line 16 of Eval/Closure.pm # once (127µs+4µs) by Moose::Meta::TypeConstraint::BEGIN@14 at line 14 of Moose/Meta/TypeConstraint.pm # once (125µs+4µs) by Class::MOP::Class::BEGIN@18 at line 18 of Class/MOP/Class.pm # once (125µs+4µs) by Class::MOP::Class::BEGIN@15 at line 15 of Class/MOP/Class.pm # once (124µs+4µs) by Moose::Meta::Attribute::BEGIN@9 at line 9 of Moose/Meta/Attribute.pm # once (123µs+5µs) by KiokuDB::BEGIN@20 at line 20 of KiokuDB.pm # once (123µs+4µs) by Class::MOP::Module::BEGIN@8 at line 8 of Class/MOP/Module.pm # once (123µs+4µs) by Tie::ToObject::BEGIN@11 at line 11 of Tie/ToObject.pm # once (123µs+4µs) by Class::MOP::Method::Meta::BEGIN@8 at line 8 of Class/MOP/Method/Meta.pm # once (123µs+4µs) by Class::MOP::Method::Wrapped::BEGIN@8 at line 8 of Class/MOP/Method/Wrapped.pm # once (123µs+4µs) by Moose::Meta::TypeConstraint::DuckType::BEGIN@8 at line 8 of Moose/Meta/TypeConstraint/DuckType.pm # once (123µs+4µs) by Class::MOP::Mixin::HasMethods::BEGIN@13 at line 13 of Class/MOP/Mixin/HasMethods.pm # once (121µs+4µs) by Moose::Util::BEGIN@10 at line 10 of Moose/Util.pm # once (121µs+4µs) by KiokuDB::TypeMap::Entry::MOP::BEGIN@7 at line 7 of KiokuDB/TypeMap/Entry/MOP.pm # once (121µs+4µs) by Moose::Meta::Role::Attribute::BEGIN@7 at line 7 of Moose/Meta/Role/Attribute.pm # once (119µs+4µs) by Moose::Role::BEGIN@6 at line 6 of Moose/Role.pm # once (119µs+4µs) by KiokuDB::LiveObjects::BEGIN@9 at line 9 of KiokuDB/LiveObjects.pm # once (117µs+4µs) by Class::MOP::Object::BEGIN@8 at line 8 of Class/MOP/Object.pm # once (113µs+0s) by B::Hooks::EndOfScope::BEGIN@14 at line 14 of B/Hooks/EndOfScope.pm # once (107µs+0s) by KiokuDB::Collapser::BEGIN@8 at line 8 of KiokuDB/Collapser.pm # once (106µs+0s) by KiokuDB::Collapser::Buffer::BEGIN@5 at line 5 of KiokuDB/Collapser/Buffer.pm # once (105µs+0s) by KiokuDB::LiveObjects::BEGIN@11 at line 11 of KiokuDB/LiveObjects.pm # once (97µs+0s) by Memoize::BEGIN@28 at line 28 of Memoize.pm # once (95µs+0s) by Sub::Identify::BEGIN@4 at line 4 of Sub/Identify.pm
sub import {
32241222.3ms my $pkg = shift;
33 my $callpkg = caller($ExportLevel);
34
35 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 :-(
41 my($exports, $fail) = (\@{"$pkg\::EXPORT"}, \@{"$pkg\::EXPORT_FAIL"});
42 return export $pkg, $callpkg, @_
43 if $Verbose or $Debug or @$fail > 1;
44 my $export_cache = ($Cache{$pkg} ||= {});
45 my $args = @_ or @_ = @$exports;
46
47 local $_;
48201.65ms if ($args and not %$export_cache) {
49 s/^&//, $export_cache->{$_} = 1
50114300µs foreach (@$exports, @{"$pkg\::EXPORT_OK"});
# spent 300µs making 114 calls to Exporter::CORE:subst, avg 3µs/call
51 }
52 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.
553226.26ms if ($args or $fail) {
56 ($heavy = (/\W/ or $args and not exists $export_cache->{$_}
57 or @$fail and $_ eq $fail->[0])) and last
582431.23ms foreach (@_);
# spent 1.23ms making 243 calls to Exporter::CORE:match, avg 5µs/call
59 } else {
60 ($heavy = /\W/) and last
61 foreach (@_);
62 }
6315.76ms return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
# spent 5.76ms making 1 call to Exporter::export
64 local $SIG{__WARN__} =
65 sub {require Carp; &Carp::carp};
66 # shortcut for the common case of no type character
67 *{"$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.23ms within Exporter::CORE:match which was called 243 times, avg 5µs/call: # 243 times (1.23ms+0s) by Exporter::import at line 58, avg 5µs/call
sub Exporter::CORE:match; # opcode
# spent 317µs within Exporter::CORE:subst which was called 115 times, avg 3µs/call: # 114 times (300µs+0s) by Exporter::import at line 50, avg 3µs/call # once (18µs+0s) by Exporter::as_heavy at line 23
sub Exporter::CORE:subst; # opcode