| 1 | package File::Slurp::Remote::CanonicalHostnames; | ||||||||||
| 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 | 1 | ▶ | use File::Slurp::Remote::BrokenDNS qw($myfqdn %fqdnify); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | our $VERSION = '0.48'; | |||||||||
| 8 | |||||||||||
| 9 | sub new | ||||||||||
| 10 | 0 | ▶ | { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 11 | 0 | my $pkg = shift; | |||||||||
| 12 | 0 | return bless {}, $pkg; | |||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | sub myname | ||||||||||
| 16 | 0 | ▶ | { | ||||||||
|
Subroutine
myname: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 17 | 0 | return $myfqdn; | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | sub canonicalize | ||||||||||
| 21 | 0 | ▶ | { | ||||||||
|
Subroutine
canonicalize: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 22 | 0 | my ($self, $name) = @_; | |||||||||
| 23 | 0 | ▶ | return $myfqdn if $name eq 'localhost'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 0 | return $fqdnify{$name}; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 1 | 1; | |||||||||
| 28 | |||||||||||
| 29 | __END__ | ||||||||||