← Index
NYTProf Performance Profile   « line view »
For /home/ss5/perl5/perlbrew/perls/perl-5.22.0/bin/benchmarkanything-storage
  Run on Mon Jan 29 16:55:34 2018
Reported on Mon Jan 29 16:57:07 2018

Filename/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/B/Hooks/EndOfScope.pm
StatementsExecuted 15 statements in 173µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11110µs10µsB::Hooks::EndOfScope::::BEGIN@13B::Hooks::EndOfScope::BEGIN@13
1119µs52µsB::Hooks::EndOfScope::::BEGIN@23B::Hooks::EndOfScope::BEGIN@23
1118µs13µsB::Hooks::EndOfScope::::BEGIN@16B::Hooks::EndOfScope::BEGIN@16
1117µs8µsB::Hooks::EndOfScope::::BEGIN@5B::Hooks::EndOfScope::BEGIN@5
1116µs1.20msB::Hooks::EndOfScope::::BEGIN@15B::Hooks::EndOfScope::BEGIN@15
1114µs6µsB::Hooks::EndOfScope::::BEGIN@6B::Hooks::EndOfScope::BEGIN@6
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package B::Hooks::EndOfScope; # git description: 0.14-19-g9296689
2# ABSTRACT: Execute code after a scope finished compilation
3# KEYWORDS: code hooks execution scope
4
5214µs29µs
# spent 8µs (7+1) within B::Hooks::EndOfScope::BEGIN@5 which was called: # once (7µs+1µs) by namespace::clean::BEGIN@11 at line 5
use strict;
# spent 8µs making 1 call to B::Hooks::EndOfScope::BEGIN@5 # spent 1µs making 1 call to strict::import
6219µs29µs
# spent 6µs (4+2) within B::Hooks::EndOfScope::BEGIN@6 which was called: # once (4µs+2µs) by namespace::clean::BEGIN@11 at line 6
use warnings;
# spent 6µs making 1 call to B::Hooks::EndOfScope::BEGIN@6 # spent 2µs making 1 call to warnings::import
7
81200nsour $VERSION = '0.15';
9
10# note - a %^H tie() fallback will probably work on 5.6 as well,
11# if you need to go that low - sane patches passing *all* tests
12# will be gladly accepted
13233µs110µs
# spent 10µs within B::Hooks::EndOfScope::BEGIN@13 which was called: # once (10µs+0s) by namespace::clean::BEGIN@11 at line 13
use 5.008001;
# spent 10µs making 1 call to B::Hooks::EndOfScope::BEGIN@13
14
15
# spent 1.20ms (6µs+1.19) within B::Hooks::EndOfScope::BEGIN@15 which was called: # once (6µs+1.19ms) by namespace::clean::BEGIN@11 at line 21
BEGIN {
16331µs217µs
# spent 13µs (8+4) within B::Hooks::EndOfScope::BEGIN@16 which was called: # once (8µs+4µs) by namespace::clean::BEGIN@11 at line 16
use Module::Implementation 0.05;
# spent 13µs making 1 call to B::Hooks::EndOfScope::BEGIN@16 # spent 4µs making 1 call to UNIVERSAL::VERSION
1714µs21.19ms Module::Implementation::build_loader_sub(
18 implementations => [ 'XS', 'PP' ],
19 symbols => [ 'on_scope_end' ],
20 )->();
21129µs11.20ms}
# spent 1.20ms making 1 call to B::Hooks::EndOfScope::BEGIN@15
22
2314µs137µs
# spent 52µs (9+43) within B::Hooks::EndOfScope::BEGIN@23 which was called: # once (9µs+43µs) by namespace::clean::BEGIN@11 at line 26
use Sub::Exporter::Progressive 0.001006 -setup => {
# spent 37µs making 1 call to Sub::Exporter::Progressive::import
24 exports => [ 'on_scope_end' ],
25 groups => { default => ['on_scope_end'] },
26238µs258µs};
# spent 52µs making 1 call to B::Hooks::EndOfScope::BEGIN@23 # spent 6µs making 1 call to UNIVERSAL::VERSION
27
28#pod =head1 SYNOPSIS
29#pod
30#pod on_scope_end { ... };
31#pod
32#pod =head1 DESCRIPTION
33#pod
34#pod This module allows you to execute code when perl finished compiling the
35#pod surrounding scope.
36#pod
37#pod =func on_scope_end
38#pod
39#pod on_scope_end { ... };
40#pod
41#pod on_scope_end $code;
42#pod
43#pod Registers C<$code> to be executed after the surrounding scope has been
44#pod compiled.
45#pod
46#pod This is exported by default. See L<Sub::Exporter> on how to customize it.
47#pod
48#pod =head1 PURE-PERL MODE CAVEAT
49#pod
50#pod While L<Variable::Magic> has access to some very dark sorcery to make it
51#pod possible to throw an exception from within a callback, the pure-perl
52#pod implementation does not have access to these hacks. Therefore, what
53#pod would have been a compile-time exception is instead converted to a
54#pod warning, and your execution will continue as if the exception never
55#pod happened.
56#pod
57#pod To explicitly request an XS (or PP) implementation one has two choices. Either
58#pod to import from the desired implementation explicitly:
59#pod
60#pod use B::Hooks::EndOfScope::XS
61#pod or
62#pod use B::Hooks::EndOfScope::PP
63#pod
64#pod or by setting C<$ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION}> to either C<XS> or
65#pod C<PP>.
66#pod
67#pod =head1 SEE ALSO
68#pod
69#pod L<Sub::Exporter>
70#pod
71#pod L<Variable::Magic>
72#pod
73#pod =cut
74
7512µs1;
76
77__END__