| 1 | #!/usr/bin/perl | ||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 2 | ▶ | use Geo::Postcodes::NO; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 2 | my ($status, @lines) = Geo::Postcodes::NO::verify_selectionlist(@ARGV); | |||||||||||
| 7 | |||||||||||||
| 8 | 2 | ▶ | if ($status == 0) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 9 | { | ||||||||||||
| 10 | 1 | print "Usage:\n", | |||||||||||
| 11 | " * multiselection.pl [all|none]\n", | ||||||||||||
| 12 | " * multiselection.pl [", | ||||||||||||
| 13 | join("|", Geo::Postcodes::NO::get_initial_selectionmodes()), | ||||||||||||
| 14 | "]? <field> <value> [[", | ||||||||||||
| 15 | join("|", Geo::Postcodes::NO::get_selectionmodes()), | ||||||||||||
| 16 | "]? [<field> <value>]]*\n\n"; | ||||||||||||
| 17 | 1 | print "Legal fields: ", join(", ", Geo::Postcodes::NO::get_fields()), "\n\n"; | |||||||||||
| 18 | 1 | print "Diagnostic output:\n"; | |||||||||||
| 19 | 1 | foreach (@lines) | |||||||||||
| 20 | { | ||||||||||||
| 21 | 1 | print " * $_\n"; | |||||||||||
| 22 | } | ||||||||||||
| 23 | 1 | exit; | |||||||||||
| 24 | } | ||||||||||||
| 25 | |||||||||||||
| 26 | 1 | my @fields = Geo::Postcodes::NO::get_fields(); | |||||||||||
| 27 | 1 | foreach my $m (@fields) | |||||||||||
| 28 | { | ||||||||||||
| 29 | 7 | printf("%-14s", ucfirst($m)); | |||||||||||
| 30 | } | ||||||||||||
| 31 | 1 | print "\n"; | |||||||||||
| 32 | |||||||||||||
| 33 | 1 | foreach my $P (Geo::Postcodes::NO->selection(@lines)) | |||||||||||
| 34 | { | ||||||||||||
| 35 | 449 | foreach my $method (@fields) | |||||||||||
| 36 | { | ||||||||||||
| 37 | 3143 | ▶ | printf("%-14s", $P->$method() || ""); | ||||||||||
|
Condition50%1/2
$P->$method || ''
MC/DC0%0/1
$P->$method || ''
$P->$method
Truth table50%1/2
A
A= $P->$method
| |||||||||||||
| 38 | } | ||||||||||||
| 39 | 449 | print "\n"; | |||||||||||
| 40 | } | ||||||||||||
| 41 | 1 | print "\n"; | |||||||||||