| Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/RegularExpressions/RequireDotMatchAnything.pm |
| Statements | Executed 18 statements in 283µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 16µs | 16µs | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@10 |
| 1 | 1 | 1 | 7µs | 31µs | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@14 |
| 1 | 1 | 1 | 7µs | 11µs | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@12 |
| 1 | 1 | 1 | 7µs | 62µs | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@18 |
| 1 | 1 | 1 | 7µs | 145µs | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@16 |
| 1 | 1 | 1 | 7µs | 18µs | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@11 |
| 1 | 1 | 1 | 6µs | 7µs | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::default_severity |
| 1 | 1 | 1 | 2µs | 2µs | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::supported_parameters |
| 0 | 0 | 0 | 0s | 0s | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::applies_to |
| 0 | 0 | 0 | 0s | 0s | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::default_themes |
| 0 | 0 | 0 | 0s | 0s | Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::violates |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | ############################################################################## | ||||
| 2 | # $URL$ | ||||
| 3 | # $Date$ | ||||
| 4 | # $Author$ | ||||
| 5 | # $Revision$ | ||||
| 6 | ############################################################################## | ||||
| 7 | |||||
| 8 | package Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything; | ||||
| 9 | |||||
| 10 | 2 | 42µs | 1 | 16µs | # spent 16µs within Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@10 which was called:
# once (16µs+0s) by Module::Pluggable::Object::_require at line 10 # spent 16µs making 1 call to Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@10 |
| 11 | 2 | 19µs | 2 | 29µs | # spent 18µs (7+11) within Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@11 which was called:
# once (7µs+11µs) by Module::Pluggable::Object::_require at line 11 # spent 18µs making 1 call to Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@11
# spent 11µs making 1 call to strict::import |
| 12 | 2 | 18µs | 2 | 15µs | # spent 11µs (7+4) within Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@12 which was called:
# once (7µs+4µs) by Module::Pluggable::Object::_require at line 12 # spent 11µs making 1 call to Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@12
# spent 4µs making 1 call to warnings::import |
| 13 | |||||
| 14 | 2 | 25µs | 2 | 55µs | # spent 31µs (7+24) within Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@14 which was called:
# once (7µs+24µs) by Module::Pluggable::Object::_require at line 14 # spent 31µs making 1 call to Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@14
# spent 24µs making 1 call to Exporter::import |
| 15 | |||||
| 16 | 2 | 23µs | 2 | 283µs | # spent 145µs (7+138) within Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@16 which was called:
# once (7µs+138µs) by Module::Pluggable::Object::_require at line 16 # spent 145µs making 1 call to Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@16
# spent 138µs making 1 call to Exporter::import |
| 17 | |||||
| 18 | 2 | 143µs | 2 | 117µs | # spent 62µs (7+55) within Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@18 which was called:
# once (7µs+55µs) by Module::Pluggable::Object::_require at line 18 # spent 62µs making 1 call to Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::BEGIN@18
# spent 55µs making 1 call to base::import |
| 19 | |||||
| 20 | 1 | 500ns | our $VERSION = '1.121'; | ||
| 21 | |||||
| 22 | #----------------------------------------------------------------------------- | ||||
| 23 | |||||
| 24 | 1 | 2µs | 1 | 28µs | Readonly::Scalar my $DESC => q{Regular expression without "/s" flag}; # spent 28µs making 1 call to Readonly::Scalar |
| 25 | 1 | 2µs | 1 | 42µs | Readonly::Scalar my $EXPL => [ 240, 241 ]; # spent 42µs making 1 call to Readonly::Scalar |
| 26 | |||||
| 27 | #----------------------------------------------------------------------------- | ||||
| 28 | |||||
| 29 | 1 | 4µs | # spent 2µs within Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::supported_parameters which was called:
# once (2µs+0s) by Perl::Critic::Policy::new at line 88 of Perl/Critic/Policy.pm | ||
| 30 | 1 | 2µs | # spent 7µs (6+1) within Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything::default_severity which was called:
# once (6µs+1µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm | ||
| 31 | sub default_themes { return qw<core pbp cosmetic> } | ||||
| 32 | sub applies_to { return qw<PPI::Token::Regexp::Match | ||||
| 33 | PPI::Token::Regexp::Substitute | ||||
| 34 | PPI::Token::QuoteLike::Regexp> } | ||||
| 35 | |||||
| 36 | #----------------------------------------------------------------------------- | ||||
| 37 | |||||
| 38 | sub violates { | ||||
| 39 | my ( $self, $elem, $doc ) = @_; | ||||
| 40 | |||||
| 41 | my $re = $doc->ppix_regexp_from_element( $elem ) | ||||
| 42 | or return; | ||||
| 43 | $re->modifier_asserted( 's' ) | ||||
| 44 | or return $self->violation( $DESC, $EXPL, $elem ); | ||||
| 45 | |||||
| 46 | return; #ok!; | ||||
| 47 | } | ||||
| 48 | |||||
| 49 | 1 | 4µs | 1; | ||
| 50 | |||||
| 51 | __END__ |