| 1 | package URI::ftp; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 8 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 8 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 8 | our $VERSION = '5.40'; | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 8 | ▶ | use parent qw(URI::_server URI::_userpass); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 16 | ▶ | sub default_port {21} | ||||||||||||||||||||||||||
|
Subroutine
default_port: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 1 | ▶ | sub encrypt_mode {undef} | ||||||||||||||||||||||||||
|
Subroutine
encrypt_mode: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 11 | ▶ | sub path { shift->path_query(@_) } # XXX | ||||||||||||||||||||||||||
|
Subroutine
path: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 23 | ▶ | sub _user { shift->SUPER::user(@_); } | ||||||||||||||||||||||||||
|
Subroutine
_user: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | 15 | ▶ | sub _password { shift->SUPER::password(@_); } | ||||||||||||||||||||||||||
|
Subroutine
_password: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 23 | ▶ | sub user { | ||||||||||||||||||||||||||
|
Subroutine
user: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 20 | 23 | my $self = shift; | |||||||||||||||||||||||||||
| 21 | 23 | my $user = $self->_user(@_); | |||||||||||||||||||||||||||
| 22 | 23 | ▶ | $user = "anonymous" unless defined $user; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 23 | 23 | $user; | |||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 15 | ▶ | sub password { | ||||||||||||||||||||||||||
|
Subroutine
password: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 27 | 15 | my $self = shift; | |||||||||||||||||||||||||||
| 28 | 15 | my $pass = $self->_password(@_); | |||||||||||||||||||||||||||
| 29 | 15 | ▶ | unless (defined $pass) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 30 | 6 | my $user = $self->user; | |||||||||||||||||||||||||||
| 31 | 6 | ▶ | if ($user eq 'anonymous' || $user eq 'ftp') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$user eq "anonymous" or $user eq "ftp"
MC/DC50%1/2
$user eq "anonymous" or $user eq "ftp"
$user eq "anonymous"
$user eq "ftp"
Truth table66%2/3
A or B
A= $user eq "anonymous"B= $user eq "ftp"
| |||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | # anonymous ftp login password | ||||||||||||||||||||||||||||
| 34 | # If there is no ftp anonymous password specified | ||||||||||||||||||||||||||||
| 35 | # then we'll just use 'anonymous@' | ||||||||||||||||||||||||||||
| 36 | # We don't try to send the read e-mail address because: | ||||||||||||||||||||||||||||
| 37 | # - We want to remain anonymous | ||||||||||||||||||||||||||||
| 38 | # - We want to stop SPAM | ||||||||||||||||||||||||||||
| 39 | # - We don't want to let ftp sites to discriminate by the user, | ||||||||||||||||||||||||||||
| 40 | # host, country or ftp client being used. | ||||||||||||||||||||||||||||
| 41 | 3 | $pass = 'anonymous@'; | |||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||
| 44 | 15 | $pass; | |||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 8 | 1; | |||||||||||||||||||||||||||