← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 22:00:36 2010
Reported on Wed Nov 17 22:10:08 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.63ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1711505µs505µsMooseX::Types::CheckedUtilExports::::__ANON__[:64]MooseX::Types::CheckedUtilExports::__ANON__[:64]
11186µs105µsMooseX::Types::CheckedUtilExports::::BEGIN@11MooseX::Types::CheckedUtilExports::BEGIN@11
11147µs165µsMooseX::Types::CheckedUtilExports::::BEGIN@14MooseX::Types::CheckedUtilExports::BEGIN@14
11145µs224µsMooseX::Types::CheckedUtilExports::::BEGIN@15MooseX::Types::CheckedUtilExports::BEGIN@15
11142µs232µsMooseX::Types::CheckedUtilExports::::BEGIN@16MooseX::Types::CheckedUtilExports::BEGIN@16
11140µs912µsMooseX::Types::CheckedUtilExports::::BEGIN@18MooseX::Types::CheckedUtilExports::BEGIN@18
11139µs106µsMooseX::Types::CheckedUtilExports::::BEGIN@12MooseX::Types::CheckedUtilExports::BEGIN@12
11138µs105µsMooseX::Types::CheckedUtilExports::::BEGIN@50MooseX::Types::CheckedUtilExports::BEGIN@50
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µs2123µs
# spent 105µs (86+18) within MooseX::Types::CheckedUtilExports::BEGIN@11 which was called: # once (86µs+18µs) by MooseX::Types::BEGIN@15 at line 11
use strict;
# spent 105µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@11 # spent 18µs making 1 call to strict::import
12394µs2174µs
# spent 106µs (39+68) within MooseX::Types::CheckedUtilExports::BEGIN@12 which was called: # once (39µs+68µs) by MooseX::Types::BEGIN@15 at line 12
use warnings;
# spent 106µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@12 # spent 68µs making 1 call to warnings::import
13382µ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
143100µs2283µs
# spent 165µs (47+118) within MooseX::Types::CheckedUtilExports::BEGIN@14 which was called: # once (47µs+118µs) by MooseX::Types::BEGIN@15 at line 14
use Moose::Exporter;
# spent 165µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@14 # spent 118µs making 1 call to Moose::Exporter::import
153115µs2404µs
# spent 224µs (45+180) within MooseX::Types::CheckedUtilExports::BEGIN@15 which was called: # once (45µs+180µs) by MooseX::Types::BEGIN@15 at line 15
use Sub::Name;
# spent 224µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@15 # spent 180µs making 1 call to Exporter::import
163116µs2422µ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
183246µs21.78ms
# spent 912µs (40+872) within MooseX::Types::CheckedUtilExports::BEGIN@18 which was called: # once (40µs+872µs) by MooseX::Types::BEGIN@15 at line 18
use namespace::clean -except => 'meta';
# spent 912µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@18 # spent 872µs making 1 call to namespace::clean::import
19
2013µ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
- -
4915µsfor my $export (@exports) {
503812µs2173µs
# spent 105µs (38+67) within MooseX::Types::CheckedUtilExports::BEGIN@50 which was called: # once (38µs+67µs) by MooseX::Types::BEGIN@15 at line 50
no strict 'refs';
# spent 105µs making 1 call to MooseX::Types::CheckedUtilExports::BEGIN@50 # spent 67µs making 1 call to strict::unimport
51
52
# spent 505µ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 30µs/call: # 17 times (505µ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 30µs/call
*{$export} = sub {
5368701µ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.5ms goto &{"Moose::Util::TypeConstraints::$export"};
# spent 14.5ms making 8 calls to Moose::Util::TypeConstraints::subtype, avg 1.81ms/call # spent 1.90ms making 1 call to Moose::Util::TypeConstraints::enum # spent 156µs making 8 calls to Moose::Util::TypeConstraints::as, avg 19µs/call
64 }
658144µs}
66
67Moose::Exporter->setup_import_methods(
68122µs14.06ms with_caller => [ @exports, 'class_type', 'role_type' ]
# spent 4.06ms 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
- -
102176µs11.55ms1;