← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/hailo
  Run on Thu Oct 21 22:50:37 2010
Reported on Thu Oct 21 22:52:08 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux/Sub/Name.pm
StatementsExecuted 15 statements in 192µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11138µs38µsSub::Name::::BEGIN@42Sub::Name::BEGIN@42
11120µs20µsSub::Name::::bootstrapSub::Name::bootstrap (xsub)
11115µs99µsSub::Name::::BEGIN@49Sub::Name::BEGIN@49
11111µs20µsSub::Name::::BEGIN@45Sub::Name::BEGIN@45
11111µs16µsSub::Name::::BEGIN@44Sub::Name::BEGIN@44
11110µs75µsSub::Name::::BEGIN@50Sub::Name::BEGIN@50
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
42243µs138µs
# spent 38µs within Sub::Name::BEGIN@42 which was called: # once (38µs+0s) by namespace::clean::BEGIN@14 at line 42
use 5.006;
# spent 38µs making 1 call to Sub::Name::BEGIN@42
43
44224µs221µs
# spent 16µs (11+5) within Sub::Name::BEGIN@44 which was called: # once (11µs+5µs) by namespace::clean::BEGIN@14 at line 44
use strict;
# spent 16µs making 1 call to Sub::Name::BEGIN@44 # spent 5µs making 1 call to strict::import
45233µs228µs
# spent 20µs (11+9) within Sub::Name::BEGIN@45 which was called: # once (11µs+9µs) by namespace::clean::BEGIN@14 at line 45
use warnings;
# spent 20µs making 1 call to Sub::Name::BEGIN@45 # spent 9µs making 1 call to warnings::import
46
4712µsour $VERSION = '0.05';
48
49228µs2184µs
# spent 99µs (15+84) within Sub::Name::BEGIN@49 which was called: # once (15µs+84µs) by namespace::clean::BEGIN@14 at line 49
use base 'Exporter';
# spent 99µs making 1 call to Sub::Name::BEGIN@49 # spent 84µs making 1 call to base::import
50247µs2140µs
# spent 75µs (10+65) within Sub::Name::BEGIN@50 which was called: # once (10µs+65µs) by namespace::clean::BEGIN@14 at line 50
use base 'DynaLoader';
# spent 75µs making 1 call to Sub::Name::BEGIN@50 # spent 65µs making 1 call to base::import
51
5211µsour @EXPORT = qw(subname);
5311µsour @EXPORT_OK = @EXPORT;
54
5518µs1297µsbootstrap Sub::Name $VERSION;
# spent 297µs making 1 call to DynaLoader::bootstrap
56
5715µs1;
 
# spent 20µs within Sub::Name::bootstrap which was called: # once (20µs+0s) by DynaLoader::bootstrap at line 219 of DynaLoader.pm
sub Sub::Name::bootstrap; # xsub