← Index
NYTProf Performance Profile   « line view »
For script/ponapi
  Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:09 2016

Filename/usr/lib/perl5/Sub/Name.pm
StatementsExecuted 15 statements in 150µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2667223859.23s9.23sSub::Name::::subnameSub::Name::subname (xsub)
11115µs15µsSub::Name::::bootstrapSub::Name::bootstrap (xsub)
11110µs10µsSub::Name::::BEGIN@42Sub::Name::BEGIN@42
1116µs10µsSub::Name::::BEGIN@45Sub::Name::BEGIN@45
1116µs63µsSub::Name::::BEGIN@49Sub::Name::BEGIN@49
1115µs48µsSub::Name::::BEGIN@50Sub::Name::BEGIN@50
1115µs13µsSub::Name::::BEGIN@44Sub::Name::BEGIN@44
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
3=head1 NAME
4
5Sub::Name - (re)name a sub
6
7=head1 SYNOPSIS
8
9 use Sub::Name;
10
11 subname $name, $subref;
12
13 $subref = subname foo => sub { ... };
14
15=head1 DESCRIPTION
16
17This module has only one function, which is also exported by default:
18
19=head2 subname NAME, CODEREF
20
21Assigns a new name to referenced sub. If package specification is omitted in
22the name, then the current package is used. The return value is the sub.
23
24The name is only used for informative routines (caller, Carp, etc). You won't
25be able to actually invoke the sub by the given name. To allow that, you need
26to do glob-assignment yourself.
27
28Note that for anonymous closures (subs that reference lexicals declared outside
29the sub itself) you can name each instance of the closure differently, which
30can be very useful for debugging.
31
32=head1 AUTHOR
33
34Matthijs van Duin <xmath@cpan.org>
35
36Copyright (C) 2004, 2008 Matthijs van Duin. All rights reserved.
37This program is free software; you can redistribute it and/or modify
38it under the same terms as Perl itself.
39
40=cut
41
42232µs110µs
# spent 10µs within Sub::Name::BEGIN@42 which was called: # once (10µs+0s) by Try::Tiny::BEGIN@1 at line 42
use 5.006;
# spent 10µs making 1 call to Sub::Name::BEGIN@42
43
44216µs221µs
# spent 13µs (5+8) within Sub::Name::BEGIN@44 which was called: # once (5µs+8µs) by Try::Tiny::BEGIN@1 at line 44
use strict;
# spent 13µs making 1 call to Sub::Name::BEGIN@44 # spent 8µs making 1 call to strict::import
45228µs213µs
# spent 10µs (6+3) within Sub::Name::BEGIN@45 which was called: # once (6µs+3µs) by Try::Tiny::BEGIN@1 at line 45
use warnings;
# spent 10µs making 1 call to Sub::Name::BEGIN@45 # spent 3µs making 1 call to warnings::import
46
471300nsour $VERSION = '0.05';
48
49221µs2121µs
# spent 63µs (6+58) within Sub::Name::BEGIN@49 which was called: # once (6µs+58µs) by Try::Tiny::BEGIN@1 at line 49
use base 'Exporter';
# spent 63µs making 1 call to Sub::Name::BEGIN@49 # spent 58µs making 1 call to base::import
50243µs292µs
# spent 48µs (5+44) within Sub::Name::BEGIN@50 which was called: # once (5µs+44µs) by Try::Tiny::BEGIN@1 at line 50
use base 'DynaLoader';
# spent 48µs making 1 call to Sub::Name::BEGIN@50 # spent 44µs making 1 call to base::import
51
521600nsour @EXPORT = qw(subname);
531400nsour @EXPORT_OK = @EXPORT;
54
5514µs1138µsbootstrap Sub::Name $VERSION;
# spent 138µs making 1 call to DynaLoader::bootstrap
56
5714µs1;
 
# spent 15µs within Sub::Name::bootstrap which was called: # once (15µs+0s) by DynaLoader::bootstrap at line 207 of DynaLoader.pm
sub Sub::Name::bootstrap; # xsub
# spent 9.23s within Sub::Name::subname which was called 2667223 times, avg 3µs/call: # 1332073 times (4.58s+0s) by Try::Tiny::try at line 60 of Try/Tiny.pm, avg 3µs/call # 1232780 times (4.35s+0s) by Class::MOP::Class::Immutable::Class::MOP::Class::_method_map or Class::MOP::Class::Immutable::Class::MOP::Class::class_precedence_list 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 or Class::MOP::Class::Immutable::Class::MOP::Class::superclasses or Class::MOP::Class::Immutable::Moose::Meta::Class::_method_map or Class::MOP::Class::Immutable::Moose::Meta::Class::calculate_all_roles or Class::MOP::Class::Immutable::Moose::Meta::Class::calculate_all_roles_with_inheritance or Class::MOP::Class::Immutable::Moose::Meta::Class::class_precedence_list or Class::MOP::Class::Immutable::Moose::Meta::Class::does_role or Class::MOP::Class::Immutable::Moose::Meta::Class::get_meta_instance or Class::MOP::Class::Immutable::Moose::Meta::Class::is_immutable or Class::MOP::Class::Immutable::Moose::Meta::Class::linearized_isa or Class::MOP::Class::Immutable::Moose::Meta::Class::superclasses or Moose::Meta::Class::__ANON__::SERIAL::10::_eval_environment or Moose::Meta::Class::__ANON__::SERIAL::10::_inline_tc_code or Moose::Meta::Class::__ANON__::SERIAL::10::new or Moose::Meta::Class::__ANON__::SERIAL::1::_canonicalize_handles or Moose::Meta::Class::__ANON__::SERIAL::1::_make_delegation_method or Moose::Meta::Class::__ANON__::SERIAL::1::_process_options or Moose::Meta::Class::__ANON__::SERIAL::1::install_accessors or Moose::Meta::Class::__ANON__::SERIAL::2::new or Moose::Meta::Class::__ANON__::SERIAL::3::new or Moose::Meta::Class::__ANON__::SERIAL::4::new or Moose::Meta::Class::__ANON__::SERIAL::5::new or Moose::Meta::Class::__ANON__::SERIAL::6::_eval_environment or Moose::Meta::Class::__ANON__::SERIAL::6::_inline_check_argument_count or Moose::Meta::Class::__ANON__::SERIAL::6::_inline_tc_code or Moose::Meta::Class::__ANON__::SERIAL::6::new or Moose::Meta::Class::__ANON__::SERIAL::7::_canonicalize_handles or Moose::Meta::Class::__ANON__::SERIAL::7::_make_delegation_method or Moose::Meta::Class::__ANON__::SERIAL::7::_process_options or Moose::Meta::Class::__ANON__::SERIAL::7::install_accessors or Moose::Meta::Class::__ANON__::SERIAL::8::new or Moose::Meta::Class::__ANON__::SERIAL::9::new at line 94 of Class/MOP/Method/Wrapped.pm, avg 4µs/call # 101107 times (295ms+0s) by Try::Tiny::try at line 61 of Try/Tiny.pm, avg 3µs/call # 687 times (1.53ms+0s) by Class::MOP::Mixin::HasMethods::add_method at line 75 of Class/MOP/Mixin/HasMethods.pm, avg 2µs/call # 504 times (822µs+0s) by Moose::Exporter::__ANON__[/usr/local/lib/perl/5.18.2/Moose/Exporter.pm:389] at line 384 of Moose/Exporter.pm, avg 2µs/call # 62 times (95µs+0s) by Class::MOP::Class::add_around_method_modifier at line 1109 of Class/MOP/Class.pm, avg 2µs/call # 6 times (15µs+0s) by Moose::Exporter::build_import_methods at line 91 of Moose/Exporter.pm, avg 3µs/call # 4 times (6µs+0s) by Class::MOP::Class::add_before_method_modifier at line 1089 of Class/MOP/Class.pm, avg 2µs/call
sub Sub::Name::subname; # xsub