Agent
view release on metacpan or search on metacpan
examples/Eval.pa view on Meta::CPAN
=head1 SYNOPSIS
use Agent;
my $agent = new Agent( Name => 'Eval', %args );
$agent->run;
=head1 DESCRIPTION
The Eval agent relocates to a I<static agent> and eval()'s some user-defined
code there. Return values are packaged in plaintext and delivered back to
the invoking program.
=head1 PARAMETERS
Host => TCP address of static agent
Eval => code to be eval()'d
Return => TCP address to return results to
verbose => self evident
examples/MyAgent.pl view on Meta::CPAN
#!/usr/bin/perl
##
# MyAgent.pl - a nice & easy example of an agent embedded in a perl
# program. Needs a Static agent to relocate to.
# Distributed with J. Duncan's permission.
# James Duncan <jduncan@hawk.igs.net>
# September, 1998.
##
BEGIN {
unless ($ARGV[0]) {
print 'Copyright 1998 James Duncan' . "\n";
print 'Released under the GNU and Perl Artistic license';
examples/Static.pa view on Meta::CPAN
my $agent = new Agent( Name => 'Static', %args );
$agent->run;
=head1 DESCRIPTION
The static agent remains local to one machine and acts as a host for other
[transportable] agents. It is an example of how one might recieve incoming
agents in a distributed environment.
The idea here is that a remote agent wishes to relocate to another host, and
has packed itself up via the store() method. The remote agent sends the
static agent a message containing its store()'d self, which the static agent
then unpacks and executes.
=head1 PARAMETERS
The following arguments may be passed when creating a new static agent:
Address => address to [attempt to] register
Medium => address medium
( run in 0.733 second using v1.01-cache-2.11-cpan-71847e10f99 )