| 1 | # ABSTRACT: match an ABC preview RSS item | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | package App::Rssfilter::Match::AbcPreviews; | ||||||||||||||||||||
| 8 | 1 | $App::Rssfilter::Match::AbcPreviews::VERSION = '0.08'; # TRIAL | |||||||||||||||||||
| 9 | 1 | ▶ | use Method::Signatures; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 1 | ▶ | func match ( $item ) { | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
match: called CC=6 SCAR=18.0
Branch: 2 branches
| |||||||||||||||||||||
| 13 | 3 | my $guid = $item->at('guid'); | |||||||||||||||||||
| 14 | 3 | my $title = $item->at('title'); | |||||||||||||||||||
| 15 | 3 | ▶ | my $guid_preview = defined $guid && $guid->text =~ / [^-] preview /xms; | ||||||||||||||||||
|
Condition66%2/3
defined $guid && $guid->text =~ / [^-] preview /msx
MC/DC50%1/2
defined $guid && $guid->text =~ / [^-] preview /msx
defined $guid
$guid->text =~ / [^-] preview /msx
Truth table66%2/3
A && B
A= defined $guidB= $guid->text =~ / [^-] preview /msx
| |||||||||||||||||||||
| 16 | 3 | ▶ | my $title_no_preview = defined $title && $title->text =~ / preview /ixms; | ||||||||||||||||||
|
Condition66%2/3
defined $title && $title->text =~ / preview /imsx
MC/DC50%1/2
defined $title && $title->text =~ / preview /imsx
defined $title
$title->text =~ / preview /imsx
Truth table66%2/3
A && B
A= defined $titleB= $title->text =~ / preview /imsx
| |||||||||||||||||||||
| 17 | 3 | ▶ | return $guid_preview && ! $title_no_preview; | ||||||||||||||||||
|
Condition66%2/3
$guid_preview && !$title_no_preview
MC/DC50%1/2
$guid_preview && !$title_no_preview
$guid_preview
!$title_no_preview
Truth table66%2/3
A && not(B)
A= $guid_previewB= !$title_no_preview
| |||||||||||||||||||||
| 18 | } | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 1 | 1; | |||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | __END__ | ||||||||||||||||||||