← 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:06 2018

Filename/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/Sub/Name.pm
StatementsExecuted 16 statements in 249µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1057653.03ms3.03msSub::Name::::subnameSub::Name::subname (xsub)
11114µs14µsSub::Name::::BEGIN@51Sub::Name::BEGIN@51
1118µs18µsSub::Name::::BEGIN@58Sub::Name::BEGIN@58
1116µs8µsSub::Name::::BEGIN@53Sub::Name::BEGIN@53
1115µs11µsSub::Name::::BEGIN@54Sub::Name::BEGIN@54
1113µs3µ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
51232µs114µs
# spent 14µs within Sub::Name::BEGIN@51 which was called: # once (14µs+0s) by Class::MOP::Mixin::HasMethods::BEGIN@10 at line 51
use 5.006;
# spent 14µs making 1 call to Sub::Name::BEGIN@51
52
53216µs210µs
# spent 8µs (6+2) within Sub::Name::BEGIN@53 which was called: # once (6µs+2µs) by Class::MOP::Mixin::HasMethods::BEGIN@10 at line 53
use strict;
# spent 8µs making 1 call to Sub::Name::BEGIN@53 # spent 2µs making 1 call to strict::import
54225µs217µs
# spent 11µs (5+6) within Sub::Name::BEGIN@54 which was called: # once (5µs+6µs) by Class::MOP::Mixin::HasMethods::BEGIN@10 at line 54
use warnings;
# spent 11µs making 1 call to Sub::Name::BEGIN@54 # spent 6µs making 1 call to warnings::import
55
561200nsour $VERSION = '0.14';
57
58335µs327µs
# spent 18µs (8+9) within Sub::Name::BEGIN@58 which was called: # once (8µs+9µs) by Class::MOP::Mixin::HasMethods::BEGIN@10 at line 58
use Exporter 5.57 'import';
# spent 18µs making 1 call to Sub::Name::BEGIN@58 # spent 5µs making 1 call to Exporter::import # spent 5µs making 1 call to UNIVERSAL::VERSION
59
601600nsour @EXPORT = qw(subname);
611300nsour @EXPORT_OK = @EXPORT;
62
63223µs13µs
# spent 3µs within Sub::Name::BEGIN@63 which was called: # once (3µs+0s) by Class::MOP::Mixin::HasMethods::BEGIN@10 at line 63
use XSLoader;
# spent 3µs making 1 call to Sub::Name::BEGIN@63
641114µs1110µsXSLoader::load(
# spent 110µs making 1 call to XSLoader::load
65 __PACKAGE__,
66 $VERSION,
67);
68
6913µs1;
70
71__END__
 
# spent 3.03ms within Sub::Name::subname which was called 1057 times, avg 3µs/call: # 673 times (1.66ms+0s) by Class::MOP::Class::Immutable::Class::MOP::Class::_method_map or Class::MOP::Class::Immutable::Class::MOP::Class::get_all_attributes or Class::MOP::Class::Immutable::Class::MOP::Class::get_meta_instance or Class::MOP::Class::Immutable::Class::MOP::Class::is_immutable or Class::MOP::Class::Immutable::Class::MOP::Class::linearized_isa at line 94 of Class/MOP/Method/Wrapped.pm, avg 2µs/call # 319 times (1.22ms+0s) by Class::MOP::Mixin::HasMethods::add_method at line 75 of Class/MOP/Mixin/HasMethods.pm, avg 4µs/call # 43 times (90µs+0s) by Class::MOP::Class::add_around_method_modifier at line 1109 of Class/MOP/Class.pm, avg 2µs/call # 10 times (22µs+0s) by Class::Accessor::_mk_accessors at line 82 of Class/Accessor.pm, avg 2µs/call # 8 times (18µs+0s) by Moose::Exporter::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/Moose/Exporter.pm:389] at line 384 of Moose/Exporter.pm, avg 2µs/call # 4 times (15µs+0s) by Moose::Exporter::build_import_methods at line 94 of Moose/Exporter.pm, avg 4µs/call
sub Sub::Name::subname; # xsub