✏️ 编辑:ftp.pm
路径:
/usr/local/share/perl5/5.32/URI/ftp.pm
大小:1.09 KB · 修改:2026-09-03 22:49:40 · 权限:0444 · 只读(保存会失败)
← 返回目录
👁 查看
⬇ 下载
package URI::ftp; use strict; use warnings; our $VERSION = '5.37'; use parent qw(URI::_server URI::_userpass); sub default_port {21} sub encrypt_mode {undef} sub path { shift->path_query(@_) } # XXX sub _user { shift->SUPER::user(@_); } sub _password { shift->SUPER::password(@_); } sub user { my $self = shift; my $user = $self->_user(@_); $user = "anonymous" unless defined $user; $user; } sub password { my $self = shift; my $pass = $self->_password(@_); unless (defined $pass) { my $user = $self->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;
💾 保存
取消
保存为 UTF-8,换行统一为 LF