Agent

 view release on metacpan or  search on metacpan

examples/dcalc.pl  view on Meta::CPAN

	-v = verbose mode
	-t = use threads
	hostN:port = ip:port of remote hosts (ie: Static agents)
	serv:port  = server address to bind to

USAGE

# if you want to see lots of meaningless output :-), uncomment these:
#$Agent::Transport::TCP::Debug = 1;
#$Agent::Debug = 1;
#$Class::Tom::debug = 2;

# first, set up the arguments:
my (%args, %hosts);
while (my $arg = shift @ARGV) {
	if ($arg =~ /.+\:\d+/) {
		# safe to say it's an ip address
		if ($args{Return}) { $hosts{$arg} = ''; }
		else               { $args{Return} = $arg; }
	} elsif ($arg =~ /-v/i) {
		$args{'verbose'} = 1;

examples/ex.pl  view on Meta::CPAN

For example, this starts a Safe Static agent in quiet mode:

	perl ex.pl -n Static -s 192.168.0.53:24368

USAGE

# if you want to see lots of meaningless output :-), uncomment these:
$Agent::Message::Debug = 1;
$Agent::Transport::TCP::Debug = 1;
$Agent::Debug = 1;
#$Class::Tom::debug = 1;

# first, set up the arguments (maybe I should use GetOpt???):
my (%args, $logfile);
while ($arg = shift @ARGV) {
	if ($arg =~ /.+\:\d+/) {
		# safe to say it's an ip address
		push (@{$args{'Hosts'}}, $arg);
		# but HelloWorld agents can only handle 1 Host:
		$args{'Address'} = $arg;
		if (exists($args{'Host'})) {



( run in 1.180 second using v1.01-cache-2.11-cpan-49f99fa48dc )