Filename | /usr/lib/x86_64-linux-gnu/perl-base/Exporter.pm |
Statements | Executed 2218 statements in 8.23ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
145 | 144 | 60 | 7.07ms | 8.92ms | import | Exporter::
24 | 3 | 1 | 1.15ms | 1.23ms | as_heavy | Exporter::
1257 | 2 | 1 | 197µs | 197µs | CORE:match (opcode) | Exporter::
1262 | 2 | 1 | 97µs | 97µs | CORE:subst (opcode) | Exporter::
18 | 5 | 4 | 47µs | 171µs | export | Exporter::
4 | 2 | 2 | 11µs | 44µs | export_to_level | Exporter::
1 | 1 | 1 | 8µs | 10µs | BEGIN@3 | Exporter::
2 | 2 | 2 | 6µs | 1.08ms | export_tags | Exporter::
1 | 1 | 1 | 3µs | 5µs | BEGIN@4 | Exporter::
0 | 0 | 0 | 0s | 0s | __ANON__[:61] | Exporter::
0 | 0 | 0 | 0s | 0s | export_fail | Exporter::
0 | 0 | 0 | 0s | 0s | export_ok_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 | 2 | 19µs | 2 | 11µs | # spent 10µs (8+1) within Exporter::BEGIN@3 which was called:
# once (8µs+1µs) by diagnostics::BEGIN@186 at line 3 # spent 10µs making 1 call to Exporter::BEGIN@3
# spent 2µs making 1 call to strict::import |
4 | 2 | 384µs | 2 | 8µs | # spent 5µs (3+2) within Exporter::BEGIN@4 which was called:
# once (3µs+2µs) by diagnostics::BEGIN@186 at line 4 # spent 5µs making 1 call to Exporter::BEGIN@4
# spent 2µs making 1 call to strict::unimport |
5 | |||||
6 | 1 | 100ns | our $Debug = 0; | ||
7 | 1 | 0s | our $ExportLevel = 0; | ||
8 | 1 | 100ns | our $Verbose ||= 0; | ||
9 | 1 | 200ns | our $VERSION = '5.77'; | ||
10 | our %Cache; | ||||
11 | |||||
12 | # spent 1.23ms (1.15+89µs) within Exporter::as_heavy which was called 24 times, avg 51µs/call:
# 18 times (89µs+35µs) by Exporter::export at line 22, avg 7µs/call
# 4 times (24µs+10µs) by Exporter::export_to_level at line 78, avg 8µs/call
# 2 times (1.03ms+44µs) by Exporter::export_tags at line 82, avg 539µs/call | ||||
13 | 24 | 78µs | require Exporter::Heavy; | ||
14 | # Unfortunately, this does not work if the caller is aliased as *name = \&foo | ||||
15 | # Thus the need to create a lot of identical subroutines | ||||
16 | 24 | 38µs | my $c = (caller(1))[3]; | ||
17 | 24 | 89µs | 24 | 53µs | $c =~ s/.*:://; # spent 53µs making 24 calls to Exporter::CORE:subst, avg 2µs/call |
18 | 24 | 63µs | \&{"Exporter::Heavy::heavy_$c"}; | ||
19 | } | ||||
20 | |||||
21 | # spent 171µs (47+124) within Exporter::export which was called 18 times, avg 10µs/call:
# 9 times (29µs+77µs) by Exporter::import at line 59, avg 12µs/call
# 4 times (8µs+13µs) by Exporter::Heavy::heavy_export_to_level at line 205 of Exporter/Heavy.pm, avg 5µs/call
# 3 times (7µs+22µs) by Carp::Assert::_export_to_level at line 59 of Carp/Assert.pm, avg 10µs/call
# once (3µs+8µs) by FileHandle::import at line 73 of FileHandle.pm
# once (1µs+4µs) by FileHandle::import at line 81 of FileHandle.pm | ||||
22 | 18 | 63µs | 36 | 2.06ms | goto &{as_heavy()}; # spent 1.93ms making 18 calls to Exporter::Heavy::heavy_export, avg 107µs/call
# spent 124µs making 18 calls to Exporter::as_heavy, avg 7µs/call |
23 | } | ||||
24 | |||||
25 | # spent 8.92ms (7.07+1.84) within Exporter::import which was called 145 times, avg 61µs/call:
# 2 times (4.10ms+1.18ms) by POSIX::import at line 192 of POSIX.pm, avg 2.64ms/call
# once (9µs+181µs) by File::Slurp::BEGIN@11 at line 11 of File/Slurp.pm
# once (128µs+8µs) by Data::Printer::Filter::GLOB::BEGIN@7 at line 7 of Data/Printer/Filter/GLOB.pm
# once (126µs+10µs) by IO::Seekable::BEGIN@103 at line 103 of IO/Seekable.pm
# once (121µs+8µs) by Data::Printer::Filter::CODE::BEGIN@7 at line 7 of Data/Printer/Filter/CODE.pm
# once (106µs+9µs) by IPC::Run::BEGIN@1087 at line 1087 of IPC/Run.pm
# once (107µs+8µs) by File::Temp::BEGIN@150 at line 150 of File/Temp.pm
# once (108µs+7µs) by IPC::Run::IO::BEGIN@68 at line 68 of IPC/Run/IO.pm
# once (103µs+7µs) by IPC::Run::BEGIN@1054 at line 1054 of IPC/Run.pm
# once (101µs+7µs) by IPC::Run::Timer::BEGIN@163 at line 163 of IPC/Run/Timer.pm
# once (25µs+57µs) by ExtUtils::MM_Unix::BEGIN@14 at line 14 of ExtUtils/MM_Unix.pm
# once (25µs+50µs) by main::BEGIN@26 at line 26 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (14µs+60µs) by Storable::BEGIN@83 at line 84 of Storable.pm
# once (62µs+5µs) by POSIX::BEGIN@11 at line 11 of POSIX.pm
# once (15µs+49µs) by Getopt::Long::import at line 119 of Getopt/Long.pm
# once (11µs+52µs) by ExtUtils::MM_Any::BEGIN@14 at line 14 of ExtUtils/MM_Any.pm
# once (58µs+5µs) by IPC::Cmd::BEGIN@5 at line 39 of FileHandle.pm
# once (18µs+44µs) by main::BEGIN@33 at line 33 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (57µs+4µs) by IPC::Cmd::BEGIN@5 at line 146 of IO/File.pm
# once (43µs+1µs) by Pod::Text::BEGIN@24 at line 24 of Pod/Text.pm
# once (28µs+1µs) by File::Temp::BEGIN@153 at line 153 of File/Temp.pm
# once (26µs+2µs) by IPC::Run::IO::BEGIN@72 at line 72 of IPC/Run/IO.pm
# once (27µs+1µs) by main::BEGIN@18 at line 18 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (26µs+2µs) by IPC::Run::BEGIN@1052 at line 1052 of IPC/Run.pm
# once (25µs+2µs) by diagnostics::BEGIN@186 at line 186 of diagnostics.pm
# once (26µs+600ns) by SelectSaver::BEGIN@6 at line 6 of SelectSaver.pm
# once (24µs+2µs) by File::Slurp::BEGIN@14 at line 14 of File/Slurp.pm
# once (24µs+1µs) by Storable::BEGIN@42 at line 42 of Storable.pm
# once (24µs+1µs) by main::BEGIN@11 at line 11 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (24µs+1µs) by diagnostics::BEGIN@197 at line 197 of diagnostics.pm
# once (23µs+1µs) by main::BEGIN@14 at line 14 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (22µs+2µs) by IPC::Cmd::BEGIN@1507 at line 1507 of IPC/Cmd.pm
# once (22µs+2µs) by main::BEGIN@51 at line 51 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (22µs+1µs) by ExtUtils::MM_Any::BEGIN@8 at line 8 of ExtUtils/MM_Any.pm
# once (22µs+2µs) by I18N::Langinfo::BEGIN@6 at line 6 of I18N/Langinfo.pm
# once (22µs+1µs) by ExtUtils::MakeMaker::BEGIN@12 at line 12 of ExtUtils/MakeMaker.pm
# once (22µs+1µs) by IPC::Run::IO::BEGIN@67 at line 67 of IPC/Run/IO.pm
# once (22µs+1µs) by File::Temp::BEGIN@149 at line 149 of File/Temp.pm
# once (22µs+1µs) by main::BEGIN@19 at line 19 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (22µs+1µs) by Gradescope::Translate::BEGIN@15 at line 15 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/lib/Gradescope/Translate.pm
# once (21µs+1µs) by Tie::Hash::BEGIN@5 at line 5 of Tie/Hash.pm
# once (21µs+1µs) by main::BEGIN@15 at line 15 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (20µs+1µs) by File::Temp::BEGIN@146 at line 146 of File/Temp.pm
# once (21µs+1µs) by IPC::Run::Timer::BEGIN@192 at line 192 of IPC/Run/Timer.pm
# once (21µs+1µs) by YAML::XS::BEGIN@29 at line 29 of YAML/XS.pm
# once (20µs+1µs) by IPC::Cmd::BEGIN@61 at line 61 of IPC/Cmd.pm
# once (19µs+1µs) by Module::Metadata::BEGIN@39 at line 39 of Module/Metadata.pm
# once (20µs+1000ns) by Gradescope::Translate::BEGIN@19 at line 19 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/lib/Gradescope/Translate.pm
# once (19µs+1µs) by File::Temp::Dir::BEGIN@2590 at line 2590 of File/Temp.pm
# once (20µs+900ns) by ExtUtils::MM_Unix::BEGIN@8 at line 8 of ExtUtils/MM_Unix.pm
# once (19µs+1µs) by Pod::Usage::BEGIN@16 at line 16 of Pod/Usage.pm
# once (19µs+1µs) by IPC::Run::IO::BEGIN@71 at line 71 of IPC/Run/IO.pm
# once (18µs+2µs) by Want::BEGIN@4 at line 4 of Want.pm
# once (18µs+1µs) by IPC::Cmd::BEGIN@59 at line 59 of IPC/Cmd.pm
# once (18µs+1µs) by IO::Prompter::BEGIN@10 at line 10 of IO/Prompter.pm
# once (18µs+1µs) by ExtUtils::MM_Unix::BEGIN@2794 at line 2794 of ExtUtils/MM_Unix.pm
# once (18µs+2µs) by Capture::Tiny::BEGIN@11 at line 11 of Capture/Tiny.pm
# once (18µs+800ns) by Contextual::Return::BEGIN@65 at line 65 of Contextual/Return.pm
# once (16µs+2µs) by IO::Prompter::BEGIN@11 at line 11 of IO/Prompter.pm
# once (17µs+1µs) by IO::Prompter::BEGIN@8 at line 8 of IO/Prompter.pm
# once (17µs+1µs) by IO::Handle::BEGIN@266 at line 266 of IO/Handle.pm
# once (16µs+2µs) by main::BEGIN@30 at line 30 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (17µs+900ns) by Encode::BEGIN@56 at line 56 of Encode.pm
# once (17µs+1µs) by Contextual::Return::BEGIN@361 at line 361 of Contextual/Return.pm
# once (17µs+900ns) by Text::CSV_XS::BEGIN@26 at line 26 of Text/CSV_XS.pm
# once (16µs+1µs) by IO::File::BEGIN@129 at line 129 of IO/File.pm
# once (16µs+700ns) by ExtUtils::MM_Any::BEGIN@10 at line 10 of ExtUtils/MM_Any.pm
# once (16µs+700ns) by IO::Seekable::BEGIN@98 at line 98 of IO/Seekable.pm
# once (16µs+900ns) by Gradescope::Color::BEGIN@15 at line 15 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/lib/Gradescope/Color.pm
# once (16µs+800ns) by Pod::Simple::TiedOutFH::BEGIN@4 at line 4 of Pod/Simple/TiedOutFH.pm
# once (16µs+900ns) by IPC::Run::Timer::BEGIN@162 at line 162 of IPC/Run/Timer.pm
# once (15µs+900ns) by ExtUtils::Liblist::Kid::BEGIN@19 at line 19 of ExtUtils/Liblist/Kid.pm
# once (15µs+1µs) by ExtUtils::MM_Unix::BEGIN@1385 at line 1385 of ExtUtils/MM_Unix.pm
# once (15µs+700ns) by File::Slurp::BEGIN@9 at line 9 of File/Slurp.pm
# once (14µs+900ns) by IPC::Open3::BEGIN@8 at line 8 of IPC/Open3.pm
# once (14µs+900ns) by main::BEGIN@22 at line 22 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (15µs+700ns) by Params::Check::BEGIN@5 at line 5 of Params/Check.pm
# once (14µs+900ns) by Socket::BEGIN@697 at line 697 of Socket.pm
# once (14µs+800ns) by Contextual::Return::Value::BEGIN@1076 at line 1076 of Contextual/Return.pm
# once (15µs+600ns) by IO::File::BEGIN@130 at line 130 of IO/File.pm
# once (14µs+700ns) by IPC::Run::IO::BEGIN@69 at line 69 of IPC/Run/IO.pm
# once (14µs+1µs) by IPC::Cmd::BEGIN@1874 at line 1874 of IPC/Cmd.pm
# once (15µs+600ns) by IPC::Run::BEGIN@1060 at line 1060 of IPC/Run.pm
# once (14µs+800ns) by IPC::Run::BEGIN@1 at line 1 of (eval 25)[IPC/Run.pm:1075]
# once (14µs+900ns) by ExtUtils::Liblist::Kid::BEGIN@18 at line 18 of ExtUtils/Liblist/Kid.pm
# once (14µs+800ns) by ExtUtils::MakeMaker::BEGIN@237 at line 237 of ExtUtils/MakeMaker.pm
# once (13µs+900ns) by Contextual::Return::BEGIN@493 at line 493 of Contextual/Return.pm
# once (13µs+600ns) by Pod::Text::BEGIN@23 at line 23 of Pod/Text.pm
# once (13µs+400ns) by IPC::Open3::BEGIN@9 at line 9 of IPC/Open3.pm
# once (13µs+700ns) by IO::BEGIN@6 at line 6 of IO.pm
# once (13µs+700ns) by File::Temp::BEGIN@151 at line 151 of File/Temp.pm
# once (13µs+900ns) by Contextual::Return::BEGIN@269 at line 269 of Contextual/Return.pm
# once (13µs+700ns) by IO::Handle::BEGIN@265 at line 265 of IO/Handle.pm
# once (13µs+600ns) by IPC::Run::Timer::BEGIN@164 at line 164 of IPC/Run/Timer.pm
# once (13µs+600ns) by SelectSaver::BEGIN@7 at line 7 of SelectSaver.pm
# once (12µs+800ns) by Contextual::Return::BEGIN@583 at line 583 of Contextual/Return.pm
# once (12µs+800ns) by IPC::Cmd::BEGIN@5 at line 33 of IPC/Cmd.pm
# once (12µs+500ns) by ExtUtils::MakeMaker::BEGIN@13 at line 13 of ExtUtils/MakeMaker.pm
# once (11µs+700ns) by main::BEGIN@29 at line 29 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (11µs+500ns) by ExtUtils::MM_Unix::BEGIN@10 at line 10 of ExtUtils/MM_Unix.pm
# once (11µs+600ns) by Module::Metadata::BEGIN@19 at line 19 of Module/Metadata.pm
# once (11µs+700ns) by Module::Load::Conditional::BEGIN@6 at line 6 of Module/Load/Conditional.pm
# once (11µs+0s) by Text::CSV::BEGIN@1 at line 1 of (eval 11)[Text/CSV.pm:114]
# once (11µs+400ns) by Module::Metadata::BEGIN@21 at line 24 of Module/Metadata.pm
# once (11µs+0s) by File::Temp::BEGIN@152 at line 152 of File/Temp.pm
# once (10µs+600ns) by File::Path::BEGIN@6 at line 6 of File/Path.pm
# once (10µs+500ns) by IO::File::BEGIN@132 at line 132 of IO/File.pm
# once (10µs+400ns) by Contextual::Return::BEGIN@80 at line 80 of Contextual/Return.pm
# once (10µs+0s) by Data::Printer::Filter::BEGIN@5 at line 5 of Data/Printer/Filter.pm
# once (9µs+400ns) by Capture::Tiny::BEGIN@12 at line 12 of Capture/Tiny.pm
# once (9µs+400ns) by Gradescope::Color::BEGIN@17 at line 17 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/lib/Gradescope/Color.pm
# once (9µs+0s) by JSON::XS::BEGIN@97 at line 97 of JSON/XS.pm
# once (9µs+0s) by Data::Printer::Common::BEGIN@5 at line 5 of Data/Printer/Common.pm
# once (9µs+0s) by Carp::Assert::BEGIN@6 at line 6 of Carp/Assert.pm
# once (9µs+0s) by Cwd::BEGIN@3 at line 3 of Cwd.pm
# once (8µs+0s) by Module::Load::Conditional::BEGIN@23 at line 23 of Module/Load/Conditional.pm
# once (8µs+300ns) by Gradescope::Color::BEGIN@18 at line 18 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/lib/Gradescope/Color.pm
# once (8µs+400ns) by YAML::XS::BEGIN@30 at line 30 of YAML/XS.pm
# once (8µs+0s) by IPC::Run::Debug::BEGIN@71 at line 71 of IPC/Run/Debug.pm
# once (7µs+0s) by IPC::Cmd::BEGIN@5 at line 34 of IPC/Cmd.pm
# once (7µs+0s) by Data::Printer::Filter::GenericClass::BEGIN@6 at line 6 of Data/Printer/Filter/GenericClass.pm
# once (6µs+0s) by File::Slurp::BEGIN@17 at line 17 of File/Slurp.pm
# once (6µs+0s) by main::BEGIN@50 at line 50 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (6µs+0s) by Getopt::Long::BEGIN@26 at line 26 of Getopt/Long.pm
# once (6µs+0s) by Text::ParseWords::BEGIN@8 at line 8 of Text/ParseWords.pm
# once (5µs+0s) by Pod::Usage::BEGIN@18 at line 18 of Pod/Usage.pm
# once (5µs+0s) by Text::CSV::BEGIN@5 at line 5 of Text/CSV.pm
# once (5µs+0s) by main::BEGIN@20 at line 20 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/bin/split.pl
# once (5µs+0s) by Data::Printer::Filter::SCALAR::BEGIN@5 at line 5 of Data/Printer/Filter/SCALAR.pm
# once (5µs+0s) by File::Temp::BEGIN@176 at line 176 of File/Temp.pm
# once (5µs+0s) by Gradescope::Translate::BEGIN@17 at line 17 of /home/hejohns/documentsNoSync/22f/490/gradescope-utils/lib/Gradescope/Translate.pm
# once (5µs+0s) by JSON::BEGIN@6 at line 6 of JSON.pm
# once (5µs+0s) by IPC::Run::BEGIN@1062 at line 1062 of IPC/Run.pm
# once (5µs+0s) by IPC::Run::BEGIN@1053 at line 1053 of IPC/Run.pm
# once (4µs+0s) by IPC::Run::Timer::BEGIN@165 at line 165 of IPC/Run/Timer.pm
# once (4µs+0s) by IPC::Cmd::BEGIN@5 at line 35 of IPC/Cmd.pm
# once (4µs+0s) by Encode::BEGIN@15 at line 15 of Encode.pm
# once (4µs+0s) by Fcntl::BEGIN@5 at line 5 of Fcntl.pm
# once (4µs+0s) by IPC::Open3::BEGIN@6 at line 6 of IPC/Open3.pm
# once (4µs+0s) by Errno::BEGIN@8 at line 8 of Errno.pm
# once (4µs+0s) by I18N::Langinfo::BEGIN@8 at line 8 of I18N/Langinfo.pm
# once (4µs+0s) by Encode::Alias::BEGIN@7 at line 7 of Encode/Alias.pm
# once (3µs+0s) by File::Slurp::BEGIN@10 at line 10 of File/Slurp.pm
# once (3µs+0s) by File::Find::BEGIN@7 at line 7 of File/Find.pm | ||||
26 | 145 | 37µs | my $pkg = shift; | ||
27 | 145 | 64µs | my $callpkg = caller($ExportLevel); | ||
28 | |||||
29 | 145 | 46µs | if ($pkg eq "Exporter" and @_ and $_[0] eq "import") { | ||
30 | 9 | 15µs | *{$callpkg."::import"} = \&import; | ||
31 | 9 | 18µs | return; | ||
32 | } | ||||
33 | |||||
34 | # We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-( | ||||
35 | 136 | 170µs | my $exports = \@{"$pkg\::EXPORT"}; | ||
36 | # But, avoid creating things if they don't exist, which saves a couple of | ||||
37 | # hundred bytes per package processed. | ||||
38 | 136 | 119µs | my $fail = ${$pkg . '::'}{EXPORT_FAIL} && \@{"$pkg\::EXPORT_FAIL"}; | ||
39 | 136 | 60µs | return export $pkg, $callpkg, @_ | ||
40 | if $Verbose or $Debug or $fail && @$fail > 1; | ||||
41 | 136 | 86µs | my $export_cache = ($Cache{$pkg} ||= {}); | ||
42 | 136 | 186µs | my $args = @_ or @_ = @$exports; | ||
43 | |||||
44 | 136 | 28µs | if ($args and not %$export_cache) { | ||
45 | s/^&//, $export_cache->{$_} = 1 | ||||
46 | 22 | 915µs | 1238 | 44µs | foreach (@$exports, @{"$pkg\::EXPORT_OK"}); # spent 44µs making 1238 calls to Exporter::CORE:subst, avg 36ns/call |
47 | } | ||||
48 | 136 | 14µs | my $heavy; | ||
49 | # Try very hard not to use {} and hence have to enter scope on the foreach | ||||
50 | # We bomb out of the loop with last as soon as heavy is set. | ||||
51 | 136 | 40µs | if ($args or $fail) { | ||
52 | ($heavy = (/\W/ or $args and not exists $export_cache->{$_} | ||||
53 | or $fail and @$fail and $_ eq $fail->[0])) and last | ||||
54 | 83 | 4.22ms | 1082 | 164µs | foreach (@_); # spent 164µs making 1082 calls to Exporter::CORE:match, avg 151ns/call |
55 | } else { | ||||
56 | ($heavy = /\W/) and last | ||||
57 | 53 | 184µs | 175 | 34µs | foreach (@_); # spent 34µs making 175 calls to Exporter::CORE:match, avg 194ns/call |
58 | } | ||||
59 | 136 | 54µs | 9 | 106µs | return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy; # spent 106µs making 9 calls to Exporter::export, avg 12µs/call |
60 | local $SIG{__WARN__} = | ||||
61 | 127 | 67µs | sub {require Carp; &Carp::carp} if not $SIG{__WARN__}; | ||
62 | # shortcut for the common case of no type character | ||||
63 | 127 | 1.14ms | *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_; | ||
64 | } | ||||
65 | |||||
66 | # Default methods | ||||
67 | |||||
68 | sub export_fail { | ||||
69 | my $self = shift; | ||||
70 | @_; | ||||
71 | } | ||||
72 | |||||
73 | # Unfortunately, caller(1)[3] "does not work" if the caller is aliased as | ||||
74 | # *name = \&foo. Thus the need to create a lot of identical subroutines | ||||
75 | # Otherwise we could have aliased them to export(). | ||||
76 | |||||
77 | # spent 44µs (11+33) within Exporter::export_to_level which was called 4 times, avg 11µs/call:
# 2 times (6µs+17µs) by Time::HiRes::import at line 91 of Time/HiRes.pm, avg 12µs/call
# 2 times (5µs+16µs) by JSON::import at line 130 of JSON.pm, avg 11µs/call | ||||
78 | 4 | 14µs | 8 | 241µs | goto &{as_heavy()}; # spent 207µs making 4 calls to Exporter::Heavy::heavy_export_to_level, avg 52µs/call
# spent 33µs making 4 calls to Exporter::as_heavy, avg 8µs/call |
79 | } | ||||
80 | |||||
81 | # spent 1.08ms (6µs+1.08) within Exporter::export_tags which was called 2 times, avg 542µs/call:
# once (3µs+1.07ms) by Carp::Assert::BEGIN@10 at line 19 of Carp/Assert.pm
# once (3µs+12µs) by main::BEGIN@18 at line 205 of File/Temp.pm | ||||
82 | 2 | 8µs | 4 | 1.10ms | goto &{as_heavy()}; # spent 1.08ms making 2 calls to Exporter::as_heavy, avg 539µs/call
# spent 25µs making 2 calls to Exporter::Heavy::heavy_export_tags, avg 12µs/call |
83 | } | ||||
84 | |||||
85 | sub export_ok_tags { | ||||
86 | goto &{as_heavy()}; | ||||
87 | } | ||||
88 | |||||
89 | sub require_version { | ||||
90 | goto &{as_heavy()}; | ||||
91 | } | ||||
92 | |||||
93 | 1 | 3µs | 1; | ||
94 | __END__ | ||||
sub Exporter::CORE:match; # opcode | |||||
sub Exporter::CORE:subst; # opcode |