Agent

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

	'IO::Socket' => 'required',
	'Class::Tom' => 'required',
	'Data::Dumper' => 'required',
	'Thread'     => ''
);


##
# Program

select(STDERR);
$| = 1;

print "Configuring Agent for $^O...\n";
if ($^O =~ /win32/i) {
	print "If you don't have a make utility, see the INSTALL file.\n";
}
checkmod( @required );
WriteMakefile(
	'NAME'	=> 'Agent',
	'VERSION_FROM' => 'Agent.pm'

examples/ex.pl  view on Meta::CPAN

		$logfile = shift @ARGV;
	} elsif ($arg =~ /-n/i) {
		$args{'Name'} = shift @ARGV;
	}
}
$args{Eval} = '2+2';
unless ($args{'Name'}) { print $usage; exit 1; }

if ($logfile) {
	open (LOG, "> $logfile") or die "couldn't open $logfile! $!";
	select LOG;
	$| = 1;
}

# then setup and execute the agent:
my $agent = new Agent( %args ) or die "couldn't create agent!";
my $results = eval { $agent->run; };
print "Error running agent: $@" if $@;
print "Results: $results\n" if $results;




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