Device-Modem
view release on metacpan or search on metacpan
lib/Device/Modem.pm view on Meta::CPAN
# Setup text and numerical response codes
@Device::Modem::RESPONSE = ( 'OK', undef, 'RING', 'NO CARRIER', 'ERROR', undef, 'NO DIALTONE', 'BUSY' );
$Device::Modem::STD_RESPONSE = qr/^(OK|ERROR|COMMAND NOT SUPPORT)$/m;
#%Device::Modem::RESPONSE = (
# 'OK' => 'Command executed without errors',
# 'RING' => 'Detected phone ring',
# 'NO CARRIER' => 'Link not established or disconnected',
# 'ERROR' => 'Invalid command or command line too long',
# 'NO DIALTONE' => 'No dial tone, dialing not possible or wrong mode',
# 'BUSY' => 'Remote terminal busy'
#);
# object constructor (prepare only object)
sub new {
my($proto,%aOpt) = @_; # Get reference to object
# Options of object
my $class = ref($proto) || $proto; # Get reference to class
$aOpt{'ostype'} = $^O; # Store OSTYPE in object
$aOpt{'ostype'} = 'windoze' if index( $aOpt{'ostype'}, 'Win' ) >= 0;
( run in 0.621 second using v1.01-cache-2.11-cpan-87723dcf8b7 )