InfoSys-FreeDB
view release on metacpan or search on metacpan
lib/InfoSys/FreeDB/Connection.pm view on Meta::CPAN
# Assignment
$self->{InfoSys_FreeDB_Connection}{proxy_passwd} = $val;
}
sub set_proxy_port {
my $self = shift;
my $val = shift;
# Check if isa/ref/rx/value is allowed
&_value_is_allowed( 'proxy_port', $val ) || throw Error::Simple("ERROR: InfoSys::FreeDB::Connection::set_proxy_port, the specified value '$val' is not allowed.");
# Assignment
$self->{InfoSys_FreeDB_Connection}{proxy_port} = $val;
}
sub set_proxy_user {
my $self = shift;
my $val = shift;
# Check if isa/ref/rx/value is allowed
&_value_is_allowed( 'proxy_user', $val ) || throw Error::Simple("ERROR: InfoSys::FreeDB::Connection::set_proxy_user, the specified value '$val' is not allowed.");
# Assignment
$self->{InfoSys_FreeDB_Connection}{proxy_user} = $val;
}
sub sites {
my $self = shift;
# Send command and wait for reply
my $cmd = 'sites';
my $content_ref = $self->_wait_command_reply($cmd, {
210 => $FINAL_DOT_RX,
401 => $FINAL_EOL_RX,
} );
# Parse the result and return it
require InfoSys::FreeDB::Response::Sites;
return( InfoSys::FreeDB::Response::Sites->new_from_content_ref(
$content_ref
) );
}
sub stat {
my $self = shift;
# Send command and wait for reply
my $cmd = 'stat';
my $content_ref = $self->_wait_command_reply($cmd, {
210 => $FINAL_DOT_RX,
} );
# Parse the result and return it
require InfoSys::FreeDB::Response::Stat;
return( InfoSys::FreeDB::Response::Stat->new_from_content_ref(
$content_ref
) );
}
sub update {
throw Error::Simple("ERROR: InfoSys::FreeDB::Connection::update, call this method in a subclass that has implemented it.");
}
sub ver {
my $self = shift;
# Send command and wait for reply
my $cmd = 'ver';
my $content_ref = $self->_wait_command_reply($cmd, {
200 => $FINAL_EOL_RX,
211 => $FINAL_DOT_RX,
} );
# Parse the result and return it
require InfoSys::FreeDB::Response::Ver;
return( InfoSys::FreeDB::Response::Ver->new_from_content_ref(
$content_ref
) );
}
sub whom {
my $self = shift;
# Send command and wait for reply
my $cmd = 'whom';
my $content_ref = $self->_wait_command_reply($cmd, {
210 => $FINAL_DOT_RX,
401 => $FINAL_EOL_RX,
} );
# Parse the result and return it
require InfoSys::FreeDB::Response::Whom;
return( InfoSys::FreeDB::Response::Whom->new_from_content_ref(
$content_ref
) );
}
sub write {
throw Error::Simple("ERROR: InfoSys::FreeDB::Connection::write, call this method in a subclass that has implemented it.");
}
( run in 1.851 second using v1.01-cache-2.11-cpan-2398b32b56e )