Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Path/IsDev/Role/Matcher/Child/BaseName/MatchRegexp/File.pm |
Statements | Executed 151 statements in 622µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
9 | 1 | 1 | 477µs | 13.2ms | child_basename_matchregexp_file | Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::
1 | 1 | 1 | 15µs | 15µs | BEGIN@1.73 | Role::Tiny::
1 | 1 | 1 | 10µs | 11µs | BEGIN@4.76 | Role::Tiny::
1 | 1 | 1 | 8µs | 86µs | BEGIN@12 | Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::
1 | 1 | 1 | 7µs | 10µs | BEGIN@3.75 | Role::Tiny::
1 | 1 | 1 | 6µs | 17µs | BEGIN@2.74 | Role::Tiny::
0 | 0 | 0 | 0s | 0s | _this_child_isfile | Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 36µs | 1 | 15µs | # spent 15µs within Role::Tiny::BEGIN@1.73 which was called:
# once (15µs+0s) by Role::Tiny::_load_module at line 1 # spent 15µs making 1 call to Role::Tiny::BEGIN@1.73 |
2 | 2 | 22µs | 2 | 27µs | # spent 17µs (6+10) within Role::Tiny::BEGIN@2.74 which was called:
# once (6µs+10µs) by Role::Tiny::_load_module at line 2 # spent 17µs making 1 call to Role::Tiny::BEGIN@2.74
# spent 10µs making 1 call to strict::import |
3 | 2 | 17µs | 2 | 14µs | # spent 10µs (7+4) within Role::Tiny::BEGIN@3.75 which was called:
# once (7µs+4µs) by Role::Tiny::_load_module at line 3 # spent 10µs making 1 call to Role::Tiny::BEGIN@3.75
# spent 4µs making 1 call to warnings::import |
4 | 2 | 51µs | 2 | 12µs | # spent 11µs (10+1) within Role::Tiny::BEGIN@4.76 which was called:
# once (10µs+1µs) by Role::Tiny::_load_module at line 4 # spent 11µs making 1 call to Role::Tiny::BEGIN@4.76
# spent 1µs making 1 call to utf8::import |
5 | |||||
6 | package Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File; | ||||
7 | 1 | 600ns | $Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::VERSION = '1.001000'; | ||
8 | # ABSTRACT: Match if any children have basename's that match a regexp and are files | ||||
9 | |||||
10 | 1 | 200ns | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | ||
11 | |||||
12 | 2 | 190µs | 2 | 163µs | # spent 86µs (8+78) within Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::BEGIN@12 which was called:
# once (8µs+78µs) by Role::Tiny::_load_module at line 12 # spent 86µs making 1 call to Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::BEGIN@12
# spent 78µs making 1 call to Role::Tiny::import |
13 | 1 | 2µs | 1 | 613µs | with 'Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp'; # spent 613µs making 1 call to Role::Tiny::__ANON__[Role/Tiny.pm:67] |
14 | |||||
- - | |||||
35 | sub _this_child_isfile { | ||||
36 | my ( $self, $result_object, $child ) = @_; | ||||
37 | my $ctx = { | ||||
38 | 'child' => "$child", | ||||
39 | tests => [], | ||||
40 | }; | ||||
41 | my $tests = $ctx->{tests}; | ||||
42 | |||||
43 | ## no critic (ValuesAndExpressions::ProhibitFiletest_f) | ||||
44 | if ( -f $child ) { | ||||
45 | push @{$tests}, { 'child_isfile?' => 1 }; | ||||
46 | $result_object->add_reason( $self, 1, "$child is a file", $ctx ); | ||||
47 | return 1; | ||||
48 | } | ||||
49 | push @{$tests}, { 'child_isfile?' => 0 }; | ||||
50 | $result_object->add_reason( $self, 0, "$child is not a file", $ctx ); | ||||
51 | |||||
52 | return; | ||||
53 | } | ||||
54 | |||||
- - | |||||
68 | # spent 13.2ms (477µs+12.8) within Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::child_basename_matchregexp_file which was called 9 times, avg 1.47ms/call:
# 9 times (477µs+12.8ms) by Path::IsDev::Heuristic::Changelog::matches at line 66 of Path/IsDev/Heuristic/Changelog.pm, avg 1.47ms/call | ||||
69 | 9 | 5µs | my ( $self, $result_object, $regexp ) = @_; | ||
70 | 9 | 99µs | 18 | 2.62ms | for my $child ( $result_object->path->children ) { # spent 2.61ms making 9 calls to Path::Tiny::children, avg 290µs/call
# spent 12µs making 9 calls to Path::IsDev::Result::path, avg 1µs/call |
71 | 110 | 174µs | 110 | 10.1ms | return 1 # spent 10.1ms making 110 calls to Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::_this_child_matchregexp, avg 92µs/call |
72 | if $self->_this_child_matchregexp( $result_object, $child, $regexp ) | ||||
73 | and $self->_this_child_isfile( $result_object, $child ); | ||||
74 | } | ||||
75 | 9 | 22µs | return; | ||
76 | |||||
77 | } | ||||
78 | |||||
79 | 1 | 3µs | 1; | ||
80 | |||||
81 | __END__ |