App-dnsq
view release on metacpan or search on metacpan
lib/DNSQuery/Interactive.pm view on Meta::CPAN
output => $output,
term => Term::ReadLine->new('dnsq'),
}, $class;
}
sub run {
my ($self) = @_;
print "Interactive Mode - Type 'help' for commands, 'quit' to exit\n\n";
my $prompt = "dnsq> ";
while (defined(my $input = $self->{term}->readline($prompt))) {
chomp $input;
$input =~ s/^\s+|\s+$//g;
next if $input eq '';
$self->{term}->addhistory($input) if $input =~ /\S/;
if ($input eq 'quit' || $input eq 'exit') {
last;
} elsif ($input eq 'help') {
$self->print_help();
( run in 1.296 second using v1.01-cache-2.11-cpan-0b5f733616e )