← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:45:08 2010
Reported on Wed Nov 17 22:11:22 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/CheckedUtilExports.pm
StatementsExecuted 106 statements in 2.68ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1711501µs501µsMooseX::Types::CheckedUtilExports::::__ANON__[:64]MooseX::Types::CheckedUtilExports::__ANON__[:64]
11174µs93µsMooseX::Types::CheckedUtilExports::::BEGIN@11MooseX::Types::CheckedUtilExports::BEGIN@11
11147µs122µsMooseX::Types::CheckedUtilExports::::BEGIN@50MooseX::Types::CheckedUtilExports::BEGIN@50
11142µs232µsMooseX::Types::CheckedUtilExports::::BEGIN@16MooseX::Types::CheckedUtilExports::BEGIN@16
11141µs1.78msMooseX::Types::CheckedUtilExports::::BEGIN@18MooseX::Types::CheckedUtilExports::BEGIN@18
11140µs239µsMooseX::Types::CheckedUtilExports::::BEGIN@15MooseX::Types::CheckedUtilExports::BEGIN@15
11138µs107µsMooseX::Types::CheckedUtilExports::::BEGIN@12MooseX::Types::CheckedUtilExports::BEGIN@12
11137µs153µsMooseX::Types::CheckedUtilExports::::BEGIN@14MooseX::Types::CheckedUtilExports::BEGIN@14
11120µs20µsMooseX::Types::CheckedUtilExports::::BEGIN@13MooseX::Types::CheckedUtilExports::BEGIN@13
0000s0sMooseX::Types::CheckedUtilExports::::class_typeMooseX::Types::CheckedUtilExports::class_type
0000s0sMooseX::Types::CheckedUtilExports::::role_typeMooseX::Types::CheckedUtilExports::role_type
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1=head1 NAME
2
- -
8package MooseX::Types::CheckedUtilExports;
913µsour $VERSION = "0.23";
10
113102µs2111µs
# spent 93µs (74+18) within MooseX::Types::CheckedUtilExports::BEGIN@11 which was called: # once (74µs+18µs) by MooseX::Types::BEGIN@15 at line 11
use strict;
# spent 93µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@11 # spent 18µs making 1 call to strict::import
12394µs2176µs
# spent 107µs (38+69) within MooseX::Types::CheckedUtilExports::BEGIN@12 which was called: # once (38µs+69µs) by MooseX::Types::BEGIN@15 at line 12
use warnings;
# spent 107µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@12 # spent 69µs making 1 call to warnings::import
13393µs120µs
# spent 20µs within MooseX::Types::CheckedUtilExports::BEGIN@13 which was called: # once (20µs+0s) by MooseX::Types::BEGIN@15 at line 13
use Moose::Util::TypeConstraints ();
# spent 20µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@13
14396µs2269µs
# spent 153µs (37+116) within MooseX::Types::CheckedUtilExports::BEGIN@14 which was called: # once (37µs+116µs) by MooseX::Types::BEGIN@15 at line 14
use Moose::Exporter;
# spent 153µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@14 # spent 116µs making 1 call to Moose::Exporter::import
153114µs2438µs
# spent 239µs (40+199) within MooseX::Types::CheckedUtilExports::BEGIN@15 which was called: # once (40µs+199µs) by MooseX::Types::BEGIN@15 at line 15
use Sub::Name;
# spent 239µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@15 # spent 199µs making 1 call to Exporter::import
163116µs2421µs
# spent 232µs (42+190) within MooseX::Types::CheckedUtilExports::BEGIN@16 which was called: # once (42µs+190µs) by MooseX::Types::BEGIN@15 at line 16
use Carp;
# spent 232µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@16 # spent 190µs making 1 call to Exporter::import
17
183234µs23.53ms
# spent 1.78ms (41µs+1.74) within MooseX::Types::CheckedUtilExports::BEGIN@18 which was called: # once (41µs+1.74ms) by MooseX::Types::BEGIN@15 at line 18
use namespace::clean -except => 'meta';
# spent 1.78ms making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@18 # spent 1.74ms making 1 call to namespace::clean::import
19
2014µsmy $StringFoundMsg =
21q{WARNING: String found where Type expected (did you use a => instead of a , ?)};
22
2319µsmy @exports = qw/type subtype maybe_type duck_type enum coerce from as/;
24
25=head1 DESCRIPTION
26
- -
4916µsfor my $export (@exports) {
503847µs2198µs
# spent 122µs (47+75) within MooseX::Types::CheckedUtilExports::BEGIN@50 which was called: # once (47µs+75µs) by MooseX::Types::BEGIN@15 at line 50
no strict 'refs';
# spent 122µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@50 # spent 75µs making 1 call to strict::unimport
51
52
# spent 501µs within MooseX::Types::CheckedUtilExports::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/CheckedUtilExports.pm:64] which was called 17 times, avg 29µs/call: # 17 times (501µs+0s) by MooseX::Types::CheckedUtilExports::as or MooseX::Types::CheckedUtilExports::enum or MooseX::Types::CheckedUtilExports::subtype at line 338 of Moose/Exporter.pm, avg 29µs/call
*{$export} = sub {
5368693µs my $caller = shift;
54
55 local $Carp::CarpLevel = $Carp::CarpLevel + 1;
56
57 carp $StringFoundMsg
58 unless ref($_[0]) ||
59 $_[0] =~ /\b::\b/ || # qualified type
60 $caller->get_registered_class_type($_[0]) ||
61 $caller->get_registered_role_type($_[0]);
62
631716.7ms goto &{"Moose::Util::TypeConstraints::$export"};
# spent 14.6ms making 8 calls to Moose::Util::TypeConstraints::subtype, avg 1.82ms/call # spent 1.97ms making 1 call to Moose::Util::TypeConstraints::enum # spent 102µs making 8 calls to Moose::Util::TypeConstraints::as, avg 13µs/call
64 }
658154µs}
66
67Moose::Exporter->setup_import_methods(
68134µs14.39ms with_caller => [ @exports, 'class_type', 'role_type' ]
# spent 4.39ms making 1 call to Moose::Exporter::setup_import_methods
69);
70
71sub class_type {
72 my $caller = shift;
73
74 $caller->register_class_type(
75 Moose::Util::TypeConstraints::class_type(@_)
76 );
77}
78
79sub role_type ($;$) {
80 my ($caller, $name, $opts) = @_;
81
82 $caller->register_role_type(
83 Moose::Util::TypeConstraints::role_type($name, $opts)
84 );
85}
86
87=head1 SEE ALSO
88
- -
102179µs13.69ms1;