← Index
NYTProf Performance Profile   « block view • line view • sub view »
For xt/tapper-mcp-scheduler-with-db-longrun.t
  Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:23:31 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose/Meta/Class/Immutable/Trait.pm
StatementsExecuted 19 statements in 308µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11122µs27µsMoose::Meta::Class::Immutable::Trait::::BEGIN@9Moose::Meta::Class::Immutable::Trait::BEGIN@9
1119µs9µsMoose::Meta::Class::Immutable::Trait::::BEGIN@2Moose::Meta::Class::Immutable::Trait::BEGIN@2
1117µs23µsMoose::Meta::Class::Immutable::Trait::::BEGIN@10Moose::Meta::Class::Immutable::Trait::BEGIN@10
1117µs46µsMoose::Meta::Class::Immutable::Trait::::BEGIN@13Moose::Meta::Class::Immutable::Trait::BEGIN@13
1117µs81µsMoose::Meta::Class::Immutable::Trait::::BEGIN@15Moose::Meta::Class::Immutable::Trait::BEGIN@15
1114µs4µsMoose::Meta::Class::Immutable::Trait::::BEGIN@12Moose::Meta::Class::Immutable::Trait::BEGIN@12
0000s0sMoose::Meta::Class::Immutable::Trait::::add_roleMoose::Meta::Class::Immutable::Trait::add_role
0000s0sMoose::Meta::Class::Immutable::Trait::::calculate_all_rolesMoose::Meta::Class::Immutable::Trait::calculate_all_roles
0000s0sMoose::Meta::Class::Immutable::Trait::::calculate_all_roles_with_inheritanceMoose::Meta::Class::Immutable::Trait::calculate_all_roles_with_inheritance
0000s0sMoose::Meta::Class::Immutable::Trait::::does_roleMoose::Meta::Class::Immutable::Trait::does_role
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Meta::Class::Immutable::Trait;
2
# spent 9µs within Moose::Meta::Class::Immutable::Trait::BEGIN@2 which was called: # once (9µs+0s) by Moose::Meta::Class::BEGIN@24 at line 4
BEGIN {
314µs $Moose::Meta::Class::Immutable::Trait::AUTHORITY = 'cpan:STEVAN';
4123µs19µs}
# spent 9µs making 1 call to Moose::Meta::Class::Immutable::Trait::BEGIN@2
5{
621µs $Moose::Meta::Class::Immutable::Trait::VERSION = '2.0602';
7}
8
9318µs231µs
# spent 27µs (22+4) within Moose::Meta::Class::Immutable::Trait::BEGIN@9 which was called: # once (22µs+4µs) by Moose::Meta::Class::BEGIN@24 at line 9
use strict;
# spent 27µs making 1 call to Moose::Meta::Class::Immutable::Trait::BEGIN@9 # spent 4µs making 1 call to strict::import
10322µs238µs
# spent 23µs (7+15) within Moose::Meta::Class::Immutable::Trait::BEGIN@10 which was called: # once (7µs+15µs) by Moose::Meta::Class::BEGIN@24 at line 10
use warnings;
# spent 23µs making 1 call to Moose::Meta::Class::Immutable::Trait::BEGIN@10 # spent 15µs making 1 call to warnings::import
11
12320µs14µs
# spent 4µs within Moose::Meta::Class::Immutable::Trait::BEGIN@12 which was called: # once (4µs+0s) by Moose::Meta::Class::BEGIN@24 at line 12
use Class::MOP;
13320µs285µs
# spent 46µs (7+39) within Moose::Meta::Class::Immutable::Trait::BEGIN@13 which was called: # once (7µs+39µs) by Moose::Meta::Class::BEGIN@24 at line 13
use Scalar::Util qw( blessed );
# spent 46µs making 1 call to Moose::Meta::Class::Immutable::Trait::BEGIN@13 # spent 39µs making 1 call to Exporter::import
14
153197µs2156µs
# spent 81µs (7+75) within Moose::Meta::Class::Immutable::Trait::BEGIN@15 which was called: # once (7µs+75µs) by Moose::Meta::Class::BEGIN@24 at line 15
use base 'Class::MOP::Class::Immutable::Trait';
# spent 81µs making 1 call to Moose::Meta::Class::Immutable::Trait::BEGIN@15 # spent 75µs making 1 call to base::import
16
17sub add_role { $_[1]->_immutable_cannot_call }
18
19sub calculate_all_roles {
20 my $orig = shift;
21 my $self = shift;
22 @{ $self->{__immutable}{calculate_all_roles} ||= [ $self->$orig ] };
23}
24
25sub calculate_all_roles_with_inheritance {
26 my $orig = shift;
27 my $self = shift;
28 @{ $self->{__immutable}{calculate_all_roles_with_inheritance} ||= [ $self->$orig ] };
29}
30
31sub does_role {
32 shift;
33 my $self = shift;
34 my $role = shift;
35
36 (defined $role)
37 || $self->throw_error("You must supply a role name to look for");
38
39 $self->{__immutable}{does_role} ||= { map { $_->name => 1 } $self->calculate_all_roles_with_inheritance };
40
41 my $name = blessed $role ? $role->name : $role;
42
43 return $self->{__immutable}{does_role}{$name};
44}
45
4612µs1;
47
48# ABSTRACT: Implements immutability for metaclass objects
49
- -
52=pod
53
54=head1 NAME
55
56Moose::Meta::Class::Immutable::Trait - Implements immutability for metaclass objects
57
58=head1 VERSION
59
60version 2.0602
61
62=head1 DESCRIPTION
63
64This class makes some Moose-specific metaclass methods immutable. This
65is deep guts.
66
67=head1 BUGS
68
69See L<Moose/BUGS> for details on reporting bugs.
70
71=head1 AUTHOR
72
73Moose is maintained by the Moose Cabal, along with the help of many contributors. See L<Moose/CABAL> and L<Moose/CONTRIBUTORS> for details.
74
75=head1 COPYRIGHT AND LICENSE
76
77This software is copyright (c) 2012 by Infinity Interactive, Inc..
78
79This is free software; you can redistribute it and/or modify it under
80the same terms as the Perl 5 programming language system itself.
81
82=cut
83
84
85__END__