← 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/lib/perl/5.18.2/Sub/Name.pm
StatementsExecuted 16 statements in 473µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
42140µs40µsSub::Name::::subnameSub::Name::subname (xsub)
11124µs33µsSub::Name::::BEGIN@54Sub::Name::BEGIN@54
11119µs19µsSub::Name::::BEGIN@51Sub::Name::BEGIN@51
11116µs35µsSub::Name::::BEGIN@58Sub::Name::BEGIN@58
11110µs45µsSub::Name::::BEGIN@53Sub::Name::BEGIN@53
1116µs6µsSub::Name::::BEGIN@63Sub::Name::BEGIN@63
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Sub::Name; # git description: v0.13-7-g79187d2
2# ABSTRACT: (re)name a sub
3
4#pod =pod
5#pod
6#pod =head1 SYNOPSIS
7#pod
8#pod use Sub::Name;
9#pod
10#pod subname $name, $subref;
11#pod
12#pod $subref = subname foo => sub { ... };
13#pod
14#pod =head1 DESCRIPTION
15#pod
16#pod This module has only one function, which is also exported by default:
17#pod
18#pod =for stopwords subname
19#pod
20#pod =head2 subname NAME, CODEREF
21#pod
22#pod Assigns a new name to referenced sub. If package specification is omitted in
23#pod the name, then the current package is used. The return value is the sub.
24#pod
25#pod The name is only used for informative routines (caller, Carp, etc). You won't
26#pod be able to actually invoke the sub by the given name. To allow that, you need
27#pod to do glob-assignment yourself.
28#pod
29#pod Note that for anonymous closures (subs that reference lexicals declared outside
30#pod the sub itself) you can name each instance of the closure differently, which
31#pod can be very useful for debugging.
32#pod
33#pod =head1 SEE ALSO
34#pod
35#pod =for :list
36#pod * L<Sub::Identify> - for getting information about subs
37#pod * L<Sub::Util> - set_subname is another implementation of C<subname>
38#pod
39#pod =for stopwords cPanel
40#pod
41#pod =head1 COPYRIGHT AND LICENSE
42#pod
43#pod This software is copyright (c) 2004, 2008 by Matthijs van Duin, all rights reserved;
44#pod copyright (c) 2014 cPanel Inc., all rights reserved.
45#pod
46#pod This program is free software; you can redistribute it and/or modify
47#pod it under the same terms as Perl itself.
48#pod
49#pod =cut
50
51258µs119µs
# spent 19µs within Sub::Name::BEGIN@51 which was called: # once (19µs+0s) by Try::Tiny::BEGIN@1 at line 51
use 5.006;
# spent 19µs making 1 call to Sub::Name::BEGIN@51
52
53246µs280µs
# spent 45µs (10+35) within Sub::Name::BEGIN@53 which was called: # once (10µs+35µs) by Try::Tiny::BEGIN@1 at line 53
use strict;
# spent 45µs making 1 call to Sub::Name::BEGIN@53 # spent 35µs making 1 call to strict::import
54264µs242µs
# spent 33µs (24+9) within Sub::Name::BEGIN@54 which was called: # once (24µs+9µs) by Try::Tiny::BEGIN@1 at line 54
use warnings;
# spent 33µs making 1 call to Sub::Name::BEGIN@54 # spent 9µs making 1 call to warnings::import
55
561700nsour $VERSION = '0.14';
57
58383µs354µs
# spent 35µs (16+19) within Sub::Name::BEGIN@58 which was called: # once (16µs+19µs) by Try::Tiny::BEGIN@1 at line 58
use Exporter 5.57 'import';
# spent 35µs making 1 call to Sub::Name::BEGIN@58 # spent 11µs making 1 call to UNIVERSAL::VERSION # spent 8µs making 1 call to Exporter::import
59
6011µsour @EXPORT = qw(subname);
611600nsour @EXPORT_OK = @EXPORT;
62
63249µs16µs
# spent 6µs within Sub::Name::BEGIN@63 which was called: # once (6µs+0s) by Try::Tiny::BEGIN@1 at line 63
use XSLoader;
# spent 6µs making 1 call to Sub::Name::BEGIN@63
641164µs1156µsXSLoader::load(
# spent 156µs making 1 call to XSLoader::load
65 __PACKAGE__,
66 $VERSION,
67);
68
6916µs1;
70
71__END__
 
# spent 40µs within Sub::Name::subname which was called 4 times, avg 10µs/call: # 2 times (25µs+0s) by Try::Tiny::try at line 60 of Try/Tiny.pm, avg 12µs/call # 2 times (16µs+0s) by Try::Tiny::try at line 61 of Try/Tiny.pm, avg 8µs/call
sub Sub::Name::subname; # xsub