| 1 | package IBGE::Municipios; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | our $VERSION = 0.01; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 2 | my %code_for_data = _init(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | sub codigo { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 5 | ▶ | my ($city, $state) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
codigo: called CC=5 SCAR=16.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | return ( $city | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | && $state | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | && exists $code_for_data{$state} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | && exists $code_for_data{$state}{$city} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 5 | ▶ | ? $code_for_data{$state}{$city} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition88%8/9
$city and $state and exists $code_for_data{$state} and exists $code_for_data{$state}{$city}
$city and $state and exists $code_for_data{$state}
$city and $state
MC/DC75%3/4
$city and $state and exists $code_for_data{$state} and exists $code_for_data{$state}{$city}
$city
$state
exists $code_for_data{$state}
exists $code_for_data{$state}{$city}
Truth table80%4/5
A and B and C and D
A= $cityB= $stateC= exists $code_for_data{$state}D= exists $code_for_data{$state}{$city}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | : undef | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | sub _init { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 2 | ▶ | my %codes = (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_init: called CC=5 SCAR=16.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 2 | ▶ | while (my $line = <DATA>) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 11234 | my ($state, $code, $city) = split /,/ => $line; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 11234 | ▶ | next unless $state && $code && $city; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
$state and $code and $city
$state and $code
MC/DC66%2/3
$state and $code and $city
$state
$code
$city
Truth table75%3/4
A and B and C
A= $stateB= $codeC= $city
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 11130 | $codes{$state}{$city} = $code; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 2 | return %codes; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | __DATA__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||