← Index
NYTProf Performance Profile   « line view »
For svc/members/upsert
  Run on Tue Jan 13 11:50:22 2015
Reported on Tue Jan 13 12:09:47 2015

Filename/usr/lib/x86_64-linux-gnu/perl5/5.20/Sub/Name.pm
StatementsExecuted 16 statements in 369µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
263287µs87µsSub::Name::::subnameSub::Name::subname (xsub)
11119µs19µsSub::Name::::BEGIN@53Sub::Name::BEGIN@53
11115µs29µsSub::Name::::BEGIN@58Sub::Name::BEGIN@58
1117µs11µsSub::Name::::BEGIN@56Sub::Name::BEGIN@56
1116µs18µsSub::Name::::BEGIN@55Sub::Name::BEGIN@55
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;
2# git description: v0.11-TRIAL-5-g86f08d9
31400ns$Sub::Name::VERSION = '0.12';
4# ABSTRACT: (re)name a sub
5
6#pod =pod
7#pod
8#pod =head1 SYNOPSIS
9#pod
10#pod use Sub::Name;
11#pod
12#pod subname $name, $subref;
13#pod
14#pod $subref = subname foo => sub { ... };
15#pod
16#pod =head1 DESCRIPTION
17#pod
18#pod This module has only one function, which is also exported by default:
19#pod
20#pod =for stopwords subname
21#pod
22#pod =head2 subname NAME, CODEREF
23#pod
24#pod Assigns a new name to referenced sub. If package specification is omitted in
25#pod the name, then the current package is used. The return value is the sub.
26#pod
27#pod The name is only used for informative routines (caller, Carp, etc). You won't
28#pod be able to actually invoke the sub by the given name. To allow that, you need
29#pod to do glob-assignment yourself.
30#pod
31#pod Note that for anonymous closures (subs that reference lexicals declared outside
32#pod the sub itself) you can name each instance of the closure differently, which
33#pod can be very useful for debugging.
34#pod
35#pod =head1 SEE ALSO
36#pod
37#pod =for :list
38#pod * L<Sub::Identify> - for getting information about subs
39#pod * L<Sub::Util> - set_subname is another implementation of C<subname>
40#pod
41#pod =for stopwords cPanel
42#pod
43#pod =head1 COPYRIGHT AND LICENSE
44#pod
45#pod This software is copyright (c) 2004, 2008 by Matthijs van Duin, all rights reserved;
46#pod copyright (c) 2014 cPanel Inc., all rights reserved.
47#pod
48#pod This program is free software; you can redistribute it and/or modify
49#pod it under the same terms as Perl itself.
50#pod
51#pod =cut
52
53242µs119µs
# spent 19µs within Sub::Name::BEGIN@53 which was called: # once (19µs+0s) by Try::Tiny::BEGIN@1 at line 53
use 5.006;
# spent 19µs making 1 call to Sub::Name::BEGIN@53
54
55222µs229µs
# spent 18µs (6+12) within Sub::Name::BEGIN@55 which was called: # once (6µs+12µs) by Try::Tiny::BEGIN@1 at line 55
use strict;
# spent 18µs making 1 call to Sub::Name::BEGIN@55 # spent 12µs making 1 call to strict::import
56226µs215µs
# spent 11µs (7+4) within Sub::Name::BEGIN@56 which was called: # once (7µs+4µs) by Try::Tiny::BEGIN@1 at line 56
use warnings;
# spent 11µs making 1 call to Sub::Name::BEGIN@56 # spent 4µs making 1 call to warnings::import
57
58367µs344µs
# spent 29µs (15+15) within Sub::Name::BEGIN@58 which was called: # once (15µs+15µs) by Try::Tiny::BEGIN@1 at line 58
use Exporter 5.57 'import';
# spent 29µs making 1 call to Sub::Name::BEGIN@58 # spent 8µs making 1 call to UNIVERSAL::VERSION # spent 7µs making 1 call to Exporter::import
59
601800nsour @EXPORT = qw(subname);
611400nsour @EXPORT_OK = @EXPORT;
62
63255µ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
64XSLoader::load(
65 __PACKAGE__,
66 exists $Sub::Name::{VERSION}
671149µs1142µs ? ${ $Sub::Name::{VERSION} }
# spent 142µs making 1 call to XSLoader::load
68 : (),
69);
70
7116µs1;
72
73__END__
 
# spent 87µs within Sub::Name::subname which was called 26 times, avg 3µs/call: # 16 times (48µs+0s) by Class::Accessor::_mk_accessors at line 82 of Class/Accessor.pm, avg 3µs/call # 5 times (28µs+0s) by Try::Tiny::try at line 60 of Try/Tiny.pm, avg 6µs/call # 5 times (11µs+0s) by Try::Tiny::try at line 61 of Try/Tiny.pm, avg 2µs/call
sub Sub::Name::subname; # xsub