← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:44 2010

File /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Sub/Name.pm
Statements Executed 20
Statement Execution Time 206µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
10971172.73ms2.73msSub::Name::::subnameSub::Name::subname (xsub)
11142µs42µsSub::Name::::BEGIN@42Sub::Name::BEGIN@42
11217µs17µsSub::Name::::bootstrapSub::Name::bootstrap (xsub)
1117µs10µsSub::Name::::BEGIN@44Sub::Name::BEGIN@44
1117µs16µsSub::Name::::BEGIN@45Sub::Name::BEGIN@45
1116µs3.75msSub::Name::::BEGIN@50Sub::Name::BEGIN@50
1116µs46µsSub::Name::::BEGIN@49Sub::Name::BEGIN@49
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
42355µs142µs
# spent 42µs within Sub::Name::BEGIN@42 which was called # once (42µs+0s) by Class::MOP::Mixin::HasMethods::BEGIN@12 at line 42
use 5.006;
# spent 42µs making 1 call to Sub::Name::BEGIN@42
43
44320µs213µs
# spent 10µs (7+3) within Sub::Name::BEGIN@44 which was called # once (7µs+3µs) by Class::MOP::Mixin::HasMethods::BEGIN@12 at line 44
use strict;
# spent 10µs making 1 call to Sub::Name::BEGIN@44 # spent 3µs making 1 call to strict::import
45329µs226µs
# spent 16µs (7+9) within Sub::Name::BEGIN@45 which was called # once (7µs+9µs) by Class::MOP::Mixin::HasMethods::BEGIN@12 at line 45
use warnings;
# spent 16µs making 1 call to Sub::Name::BEGIN@45 # spent 9µs making 1 call to warnings::import
46
471800nsour $VERSION = '0.04';
48
49323µs285µs
# spent 46µs (6+39) within Sub::Name::BEGIN@49 which was called # once (6µs+39µs) by Class::MOP::Mixin::HasMethods::BEGIN@12 at line 49
use base 'Exporter';
# spent 46µs making 1 call to Sub::Name::BEGIN@49 # spent 39µs making 1 call to base::import
50365µs27.50ms
# spent 3.75ms (6µs+3.75) within Sub::Name::BEGIN@50 which was called # once (6µs+3.75ms) by Class::MOP::Mixin::HasMethods::BEGIN@12 at line 50
use base 'DynaLoader';
# spent 3.75ms making 1 call to Sub::Name::BEGIN@50 # spent 3.75ms making 1 call to base::import
51
521900nsour @EXPORT = qw(subname);
531400nsour @EXPORT_OK = @EXPORT;
54
5514µs1289µsbootstrap Sub::Name $VERSION;
# spent 289µs making 1 call to DynaLoader::bootstrap
56
5717µs1;
# spent 17µs within Sub::Name::bootstrap which was called # once (17µs+0s) by DynaLoader::bootstrap at line 227 of DynaLoader.pm
sub Sub::Name::bootstrap; # xsub
# spent 2.73ms within Sub::Name::subname which was called 1097 times, avg 2µs/call: # 525 times (1.51ms+0s) by Class::MOP::Mixin::HasMethods::add_method at line 66 of Class/MOP/Mixin/HasMethods.pm, avg 3µs/call # 384 times (745µs+0s) by Moose::Exporter::__ANON__[/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Exporter.pm:263] at line 258 of Moose/Exporter.pm, avg 2µs/call # 65 times (158µs+0s) by Class::MOP::Class::add_around_method_modifier at line 705 of Class/MOP/Class.pm, avg 2µs/call # 35 times (81µs+0s) by MooseX::Types::type_export_generator at line 417 of MooseX/Types.pm, avg 2µs/call # 22 times (54µs+0s) by Class::MOP::Class::add_after_method_modifier at line 695 of Class/MOP/Class.pm, avg 2µs/call # 21 times (41µs+0s) by Moose::Exporter::__ANON__[/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Exporter.pm:241] at line 236 of Moose/Exporter.pm, avg 2µs/call # 13 times (44µs+0s) by Class::MOP::Class::add_before_method_modifier at line 685 of Class/MOP/Class.pm, avg 3µs/call # 11 times (43µs+0s) by Moose::Meta::TypeConstraint::_compile_subtype at line 253 of Moose/Meta/TypeConstraint.pm, avg 4µs/call # 10 times (26µs+0s) by Moose::Meta::TypeConstraint::_compile_subtype at line 266 of Moose/Meta/TypeConstraint.pm, avg 3µs/call # 10 times (16µs+0s) by SimpleDB::Class::Item::_install_sub at line 26 of ../lib/SimpleDB/Class/Item.pm, avg 2µs/call # once (12µs+0s) by Moose::Meta::TypeConstraint::_compile_type at line 279 of Moose/Meta/TypeConstraint.pm
sub Sub::Name::subname; # xsub