<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package URI::ftp;

use strict;
use warnings;

our $VERSION = '5.10';

use parent qw(URI::_server URI::_userpass);

sub default_port { 21 }

sub path { shift-&gt;path_query(@_) }  # XXX

sub _user     { shift-&gt;SUPER::user(@_);     }
sub _password { shift-&gt;SUPER::password(@_); }

sub user
{
    my $self = shift;
    my $user = $self-&gt;_user(@_);
    $user = "anonymous" unless defined $user;
    $user;
}

sub password
{
    my $self = shift;
    my $pass = $self-&gt;_password(@_);
    unless (defined $pass) {
	my $user = $self-&gt;user;
	if ($user eq 'anonymous' || $user eq 'ftp') {
	    # anonymous ftp login password
            # If there is no ftp anonymous password specified
            # then we'll just use 'anonymous@'
            # We don't try to send the read e-mail address because:
            # - We want to remain anonymous
            # - We want to stop SPAM
            # - We don't want to let ftp sites to discriminate by the user,
            #   host, country or ftp client being used.
	    $pass = 'anonymous@';
	}
    }
    $pass;
}

1;
</pre></body></html>