use Net::Cmd; @ISA = qw(Net::Cmd);
Net::Cmd
is a collection of methods that can be inherited by a sub class of IO::Handle
. These methods implement the functionality required for a command based protocol, for example
FTP and
SMTP.
Net::Cmd
object.
VALUE
is not given then the current state is returned. Otherwise the state is
changed to
VALUE
and the previous state returned.
Set the level of debug information for this object. If no argument is given
then the current state is returned. Otherwise the state is changed to $value
and the previous state returned. Different packages may implement different levels of debug but, a non-zero value result in copies of all commands and responses also being sent to
STDERR.
If VALUE
is undef then the debug level will be set to the default debug level for the class.
This method can also be called as a static method to set/get the default debug level for a given class.
CMD_PENDING
is returned.
DATA
may be an array or a reference to an array.
Net::Cmd
This is primarily meant for the use of modules such as FTP where passwords are sent, but we do not want to display them in the debugging information.
Returns undef upon failure
NOTE: If you do use this method for any reason, please remember to add some debug_print calls into your method.
Returns a reference to a list containing the lines, or undef upon failure.
Net::Cmd
exports six subroutines, five of these, CMD_INFO
, CMD_OK
,
CMD_MORE
, CMD_REJECT
and CMD_ERROR
,correspond to possible results of response and status. The sixth is CMD_PENDING
.