"SfR Fresh" - the SfR Freeware/Shareware Archive 
Member "URI-1.37/URI/ftp.pm" of archive URI-1.37.tar.gz:
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1 package URI::ftp;
2
3 require URI::_server;
4 require URI::_userpass;
5 @ISA=qw(URI::_server URI::_userpass);
6
7 use strict;
8
9 sub default_port { 21 }
10
11 sub path { shift->path_query(@_) } # XXX
12
13 sub _user { shift->SUPER::user(@_); }
14 sub _password { shift->SUPER::password(@_); }
15
16 sub user
17 {
18 my $self = shift;
19 my $user = $self->_user(@_);
20 $user = "anonymous" unless defined $user;
21 $user;
22 }
23
24 sub password
25 {
26 my $self = shift;
27 my $pass = $self->_password(@_);
28 unless (defined $pass) {
29 my $user = $self->user;
30 if ($user eq 'anonymous' || $user eq 'ftp') {
31 # anonymous ftp login password
32 # If there is no ftp anonymous password specified
33 # then we'll just use 'anonymous@'
34 # We don't try to send the read e-mail address because:
35 # - We want to remain anonymous
36 # - We want to stop SPAM
37 # - We don't want to let ftp sites to discriminate by the user,
38 # host, country or ftp client being used.
39 $pass = 'anonymous@';
40 }
41 }
42 $pass;
43 }
44
45 1;