← Index
NYTProf Performance Profile   « line view »
For index.cgi
  Run on Sat May 9 17:18:47 2020
Reported on Sat May 9 17:19:07 2020

Filename/usr/local/share/perl/5.18.2/B/Hooks/EndOfScope.pm
StatementsExecuted 15 statements in 508µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.23ms5.05msB::Hooks::EndOfScope::::BEGIN@16B::Hooks::EndOfScope::BEGIN@16
11120µs117µsB::Hooks::EndOfScope::::BEGIN@23B::Hooks::EndOfScope::BEGIN@23
11114µs30µsB::Hooks::EndOfScope::::BEGIN@5B::Hooks::EndOfScope::BEGIN@5
11114µs14µsB::Hooks::EndOfScope::::BEGIN@13B::Hooks::EndOfScope::BEGIN@13
11113µs3.62msB::Hooks::EndOfScope::::BEGIN@15B::Hooks::EndOfScope::BEGIN@15
11110µs15µ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
5243µs246µs
# spent 30µs (14+16) within B::Hooks::EndOfScope::BEGIN@5 which was called: # once (14µs+16µs) by namespace::autoclean::BEGIN@10 at line 5
use strict;
# spent 30µs making 1 call to B::Hooks::EndOfScope::BEGIN@5 # spent 16µs making 1 call to strict::import
6249µs220µs
# spent 15µs (10+5) within B::Hooks::EndOfScope::BEGIN@6 which was called: # once (10µs+5µs) by namespace::autoclean::BEGIN@10 at line 6
use warnings;
# spent 15µs making 1 call to B::Hooks::EndOfScope::BEGIN@6 # spent 5µs making 1 call to warnings::import
7
81700nsour $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
13271µs114µs
# spent 14µs within B::Hooks::EndOfScope::BEGIN@13 which was called: # once (14µs+0s) by namespace::autoclean::BEGIN@10 at line 13
use 5.008001;
# spent 14µs making 1 call to B::Hooks::EndOfScope::BEGIN@13
14
15
# spent 3.62ms (13µs+3.61) within B::Hooks::EndOfScope::BEGIN@15 which was called: # once (13µs+3.61ms) by namespace::autoclean::BEGIN@10 at line 21
BEGIN {
163164µs25.06ms
# spent 5.05ms (1.23+3.82) within B::Hooks::EndOfScope::BEGIN@16 which was called: # once (1.23ms+3.82ms) by namespace::autoclean::BEGIN@10 at line 16
use Module::Implementation 0.05;
# spent 5.05ms making 1 call to B::Hooks::EndOfScope::BEGIN@16 # spent 13µs making 1 call to UNIVERSAL::VERSION
1717µs23.61ms Module::Implementation::build_loader_sub(
18 implementations => [ 'XS', 'PP' ],
19 symbols => [ 'on_scope_end' ],
20 )->();
21175µs13.62ms}
# spent 3.62ms making 1 call to B::Hooks::EndOfScope::BEGIN@15
22
2318µs184µs
# spent 117µs (20+97) within B::Hooks::EndOfScope::BEGIN@23 which was called: # once (20µs+97µs) by namespace::autoclean::BEGIN@10 at line 26
use Sub::Exporter::Progressive 0.001006 -setup => {
# spent 84µs making 1 call to Sub::Exporter::Progressive::import
24 exports => [ 'on_scope_end' ],
25 groups => { default => ['on_scope_end'] },
26280µs2130µs};
# spent 117µs making 1 call to B::Hooks::EndOfScope::BEGIN@23 # spent 13µ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
7519µs1;
76
77__END__