« lib/Perl/Critic/PolicyParameter/Behavior/String.pm
↑ Summary
lib/Perl/Critic/Policy/InputOutput/ProhibitInteractiveTest.pm »
| 1 | package Perl::Critic::PolicyListing; | ||||||||||||
| 2 | |||||||||||||
| 3 | 2 | ▶ | use 5.010001; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 2 | ▶ | use Perl::Critic::Policy qw(); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 2 | ▶ | use overload ( q<""> => 'to_string' ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | |||||||||||||
| 11 | 2 | our $VERSION = '1.156'; | |||||||||||
| 12 | |||||||||||||
| 13 | #----------------------------------------------------------------------------- | ||||||||||||
| 14 | |||||||||||||
| 15 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 16 | 2 | my ($class, %args) = @_; | |||||||||||
| 17 | |||||||||||||
| 18 | 2 | my $self = bless {}, $class; | |||||||||||
| 19 | |||||||||||||
| 20 | 2 | ▶ | my $policies = $args{-policies} || []; | ||||||||||
|
Condition100%2/2
$args{'-policies'} || []
MC/DC100%1/1
$args{'-policies'} || []
$args{'-policies'}
Truth table100%2/2
A
A= $args{'-policies'}
| |||||||||||||
| 21 | 2 | $self->{_policies} = [ sort _by_type @{ $policies } ]; | |||||||||||
| 22 | |||||||||||||
| 23 | 2 | return $self; | |||||||||||
| 24 | } | ||||||||||||
| 25 | |||||||||||||
| 26 | #----------------------------------------------------------------------------- | ||||||||||||
| 27 | |||||||||||||
| 28 | 1 | ▶ | sub to_string { | ||||||||||
|
Subroutine
to_string: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 29 | 1 | my ($self) = @_; | |||||||||||
| 30 | |||||||||||||
| 31 | 1 | Perl::Critic::Policy::set_format( "%s %p [%t]\n" ); | |||||||||||
| 32 | |||||||||||||
| 33 | 1 | return join q{}, map { "$_" } @{ $self->{_policies} }; | |||||||||||
| 34 | } | ||||||||||||
| 35 | |||||||||||||
| 36 | #----------------------------------------------------------------------------- | ||||||||||||
| 37 | |||||||||||||
| 38 | 144 | ▶ | sub _by_type { return ref $a cmp ref $b } | ||||||||||
|
Subroutine
_by_type: called CC=1 SCAR=0.0
| |||||||||||||
| 39 | |||||||||||||
| 40 | 2 | 1; | |||||||||||
| 41 | |||||||||||||
| 42 | __END__ | ||||||||||||