« lib/Perl/Critic/Policy/Modules/ProhibitMultiplePackages.pm
↑ Summary
lib/Perl/Critic/Policy/CodeLayout/ProhibitTrailingWhitespace.pm »
| 1 | package Perl::Critic::ThemeListing; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | ▶ | use 5.010001; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 1 | ▶ | use overload ( q<""> => 'to_string' ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 1 | our $VERSION = '1.156'; | |||||||||||
| 10 | |||||||||||||
| 11 | #----------------------------------------------------------------------------- | ||||||||||||
| 12 | |||||||||||||
| 13 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||
| 14 | 1 | my ($class, %args) = @_; | |||||||||||
| 15 | |||||||||||||
| 16 | 1 | my $self = bless {}, $class; | |||||||||||
| 17 | |||||||||||||
| 18 | 1 | ▶ | $self->{_policies} = $args{-policies} || []; | ||||||||||
|
Condition50%1/2
$args{'-policies'} || []
MC/DC0%0/1
$args{'-policies'} || []
$args{'-policies'}
Truth table50%1/2
A
A= $args{'-policies'}
| |||||||||||||
| 19 | |||||||||||||
| 20 | 1 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | #----------------------------------------------------------------------------- | ||||||||||||
| 24 | |||||||||||||
| 25 | 1 | ▶ | sub to_string { | ||||||||||
|
Subroutine
to_string: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 26 | 1 | my ($self) = @_; | |||||||||||
| 27 | |||||||||||||
| 28 | 1 | my %themes; | |||||||||||
| 29 | 1 | foreach my $policy ( @{ $self->{_policies} } ) { | |||||||||||
| 30 | 145 | my @themes = $policy->get_themes(); | |||||||||||
| 31 | 145 | @themes{ @themes } = @themes; | |||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | 1 | return join ("\n", sort keys %themes) . "\n"; | |||||||||||
| 35 | } | ||||||||||||
| 36 | |||||||||||||
| 37 | #----------------------------------------------------------------------------- | ||||||||||||
| 38 | |||||||||||||
| 39 | 1 | 1; | |||||||||||
| 40 | |||||||||||||
| 41 | __END__ | ||||||||||||