| 1 | package Ftree::Place; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | ▶ | use version; our $VERSION = qv('2.3.41'); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 2 | ▶ | use Params::Validate qw(:all); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 13 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 11 | 13 | my ( $classname, $country, $city) = @_; | |||||||||
| 12 | 13 | my $self = { | |||||||||
| 13 | country => $country, | ||||||||||
| 14 | city => $city, | ||||||||||
| 15 | }; | ||||||||||
| 16 | 13 | return bless $self, $classname; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub toString { | ||||||||
|
Subroutine
toString: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 20 | 0 | my ( $self) = validate_pos(@_, HASHREF); | |||||||||
| 21 | 0 | ▶ | if(defined $self->{city}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 0 | ▶ | return defined $self->{city} ? "$self->{city} ($self->{country})" : $self->{country}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | } | ||||||||||
| 24 | else { | ||||||||||
| 25 | 0 | ▶ | return defined $self->{country} ? $self->{country} : ""; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | } | ||||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 2 | 1; | |||||||||