← 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:14:05 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/MooseX/Types/Util.pm
StatementsExecuted 37 statements in 1.20ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111172µs198µsMooseX::Types::Util::::filter_tagsMooseX::Types::Util::filter_tags
11178µs151µsMooseX::Types::Util::::BEGIN@10MooseX::Types::Util::BEGIN@10
11138µs53µsMooseX::Types::Util::::BEGIN@11MooseX::Types::Util::BEGIN@11
11137µs199µsMooseX::Types::Util::::BEGIN@12MooseX::Types::Util::BEGIN@12
11136µs273µsMooseX::Types::Util::::BEGIN@14MooseX::Types::Util::BEGIN@14
91125µs25µsMooseX::Types::Util::::CORE:matchMooseX::Types::Util::CORE:match (opcode)
0000s0sMooseX::Types::Util::::has_available_type_exportMooseX::Types::Util::has_available_type_export
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::Util;
214µsour $VERSION = "0.23";
3
4=head1 NAME
5
- -
103106µs2225µs
# spent 151µs (78+73) within MooseX::Types::Util::BEGIN@10 which was called: # once (78µs+73µs) by MooseX::Types::Base::BEGIN@12 at line 10
use warnings;
# spent 151µs making 1 call to MooseX::Types::Util::BEGIN@10 # spent 73µs making 1 call to warnings::import
11396µs268µs
# spent 53µs (38+15) within MooseX::Types::Util::BEGIN@11 which was called: # once (38µs+15µs) by MooseX::Types::Base::BEGIN@12 at line 11
use strict;
# spent 53µs making 1 call to MooseX::Types::Util::BEGIN@11 # spent 15µs making 1 call to strict::import
123110µs2361µs
# spent 199µs (37+162) within MooseX::Types::Util::BEGIN@12 which was called: # once (37µs+162µs) by MooseX::Types::Base::BEGIN@12 at line 12
use Scalar::Util 'blessed';
# spent 199µs making 1 call to MooseX::Types::Util::BEGIN@12 # spent 162µs making 1 call to Exporter::import
13
143662µs2510µs
# spent 273µs (36+237) within MooseX::Types::Util::BEGIN@14 which was called: # once (36µs+237µs) by MooseX::Types::Base::BEGIN@12 at line 14
use base 'Exporter';
# spent 273µs making 1 call to MooseX::Types::Util::BEGIN@14 # spent 237µs making 1 call to base::import
15
16=head1 DESCRIPTION
17
- -
2316µsour @EXPORT_OK = qw( filter_tags has_available_type_export );
24
25=head1 FUNCTIONS
26
- -
35
# spent 198µs (172+25) within MooseX::Types::Util::filter_tags which was called: # once (172µs+25µs) by MooseX::Types::import at line 345 of MooseX/Types.pm
sub filter_tags {
36110µs my (@list) = @_;
3713µs my (%tags, @other);
3816µs for (@list) {
399109µs925µs if (/^:(.*)$/) {
# spent 25µs making 9 calls to MooseX::Types::Util::CORE:match, avg 3µs/call
40 $tags{ $1 }++;
41 next;
42 }
43956µs push @other, $_;
44 }
45120µs return \%tags, \@other;
46}
47
48=head2 has_available_type_export
49
- -
86sub has_available_type_export {
87 my ($package, $name) = @_;
88
89 my $sub = $package->can($name)
90 or return undef;
91
92 return undef
93 unless blessed $sub && $sub->isa('MooseX::Types::EXPORTED_TYPE_CONSTRAINT');
94
95 return $sub->();
96}
97
98=head1 SEE ALSO
99
- -
113113µs1;
 
# spent 25µs within MooseX::Types::Util::CORE:match which was called 9 times, avg 3µs/call: # 9 times (25µs+0s) by MooseX::Types::Util::filter_tags at line 39, avg 3µs/call
sub MooseX::Types::Util::CORE:match; # opcode