← 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:47 2010

File /usr/local/lib/perl5/site_perl/5.10.1/MooseX/Types/Moose.pm
Statements Executed 62
Statement Execution Time 280µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
453129µs29µsMooseX::Types::Moose::::type_storageMooseX::Types::Moose::type_storage
11115µs25µsMooseX::Types::Moose::::BEGIN@9MooseX::Types::Moose::BEGIN@9
1118µs368µsMooseX::Types::Moose::::BEGIN@15MooseX::Types::Moose::BEGIN@15
1117µs10µsMooseX::Types::Moose::::BEGIN@10MooseX::Types::Moose::BEGIN@10
1116µs2.23msMooseX::Types::Moose::::BEGIN@12MooseX::Types::Moose::BEGIN@12
1114µs4µsMooseX::Types::Moose::::BEGIN@13MooseX::Types::Moose::BEGIN@13
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package MooseX::Types::Moose;
2
3=head1 NAME
4
5MooseX::Types::Moose - Types shipped with L<Moose>
6
7=cut
8
9322µs235µs
# spent 25µs (15+10) within MooseX::Types::Moose::BEGIN@9 which was called # once (15µs+10µs) by SimpleDB::Class::Types::BEGIN@83 at line 9
use warnings;
# spent 25µs making 1 call to MooseX::Types::Moose::BEGIN@9 # spent 10µs making 1 call to warnings::import
10319µs212µs
# spent 10µs (7+2) within MooseX::Types::Moose::BEGIN@10 which was called # once (7µs+2µs) by SimpleDB::Class::Types::BEGIN@83 at line 10
use strict;
# spent 10µs making 1 call to MooseX::Types::Moose::BEGIN@10 # spent 2µs making 1 call to strict::import
11
12324µs24.45ms
# spent 2.23ms (6µs+2.22) within MooseX::Types::Moose::BEGIN@12 which was called # once (6µs+2.22ms) by SimpleDB::Class::Types::BEGIN@83 at line 12
use MooseX::Types;
# spent 2.23ms making 1 call to MooseX::Types::Moose::BEGIN@12 # spent 2.22ms making 1 call to MooseX::Types::import
13324µs14µs
# spent 4µs within MooseX::Types::Moose::BEGIN@13 which was called # once (4µs+0s) by SimpleDB::Class::Types::BEGIN@83 at line 13
use Moose::Util::TypeConstraints ();
# spent 4µs making 1 call to MooseX::Types::Moose::BEGIN@13
14
15380µs2728µs
# spent 368µs (8+360) within MooseX::Types::Moose::BEGIN@15 which was called # once (8µs+360µs) by SimpleDB::Class::Types::BEGIN@83 at line 15
use namespace::clean -except => [qw( meta )];
# spent 368µs making 1 call to MooseX::Types::Moose::BEGIN@15 # spent 360µs making 1 call to namespace::clean::import
16
17=head1 SYNOPSIS
18
19 package Foo;
20 use Moose;
21 use MooseX::Types::Moose qw( Int Str );
22 use Carp qw( croak );
23
24 has 'name',
25 is => 'rw',
26 isa => Str;
27
28 has 'id',
29 is => 'rw',
30 isa => Int;
31
32 sub add {
33 my ($self, $x, $y) = @_;
34 croak 'First arg not an Int' unless is_Int($x);
35 croak 'Second arg not an Int' unless is_Int($y);
36 return $x + $y;
37 }
38
39 1;
40
41=head1 DESCRIPTION
42
43This package contains a virtual library for L<MooseX::Types> that
44is able to export all types known to L<Moose>. See L<MooseX::Types>
45for general usage information.
46
47=cut
48
49# all available builtin types as short and long name
50my %BuiltIn_Storage
51132µs19µs = map { ($_) x 2 }
52 Moose::Util::TypeConstraints->list_all_builtin_type_constraints;
53
54=head1 METHODS
55
56=head2 type_storage
57
58Overrides L<MooseX::Types::Base>' C<type_storage> to provide a hash
59reference containing all built-in L<Moose> types.
60
61=cut
62
63# use prepopulated builtin hash as type storage
644564µs
# spent 29µs within MooseX::Types::Moose::type_storage which was called 45 times, avg 647ns/call: # 22 times (15µs+0s) by MooseX::Types::Base::has_type at line 171 of MooseX/Types/Base.pm, avg 682ns/call # 22 times (13µs+0s) by MooseX::Types::Base::get_type at line 131 of MooseX/Types/Base.pm, avg 605ns/call # once (800ns+0s) by MooseX::Types::Base::type_names at line 144 of MooseX/Types/Base.pm
sub type_storage { \%BuiltIn_Storage }
65
66=head1 SEE ALSO
67
68L<MooseX::Types::Moose>,
69L<Moose>,
70L<Moose::Util::TypeConstraints>
71
72=head1 AUTHOR
73
74See L<MooseX::Types/AUTHOR>.
75
76=head1 LICENSE
77
78This program is free software; you can redistribute it and/or modify
79it under the same terms as perl itself.
80
81=cut
82
83114µs1367µs1;