Agent
view release on metacpan or search on metacpan
I<Stored>: The agent stored in a Tom object.
I<File>: An IO::Handle (or any subclass) file handle from which the
agent can be read.
I<Name>: The agent's name. This prompts new to search @INC and './'
for the agent's '.pa' source file.
I<Code>: The agent's source code.
These are listed in order of precedence. To handle security issues,
new() also groks this argument:
I<Compartment>: A Safe Compartment within which the agent will be
registered, and later executed. See the C<Safe> pod for details.
Developers should note that these keywords are I<reserved>. Any additional
arguments are passed to the agent being created.
=back
Using Agents
------------
First of all, make sure you know how to use an object (the perlobj manpage is
a good place to start). Then read the Agent.pm's POD, and that of the agent
you are trying to use. After that, you're on your own, unless there are any
examples lying around :-).
If you would like to use the security features of Agent Perl, browse through
the Safe and Opcode PODs, and have a gander at 'Safe.readme'.
Developing Agents
-----------------
After you've read this, read the PODs for Agent.pm and all of its nested
modules. Read *.readme in the root directory. Then have a look in the
'examples' sub-directory for some functional *sample* agents.
Safe.readme view on Meta::CPAN
As a side effect of the above points, an agent that tries to 'store' itself
will have difficulties doing so unless you've shared the Agent:: namespace
with it. And any agent that tries to communicate won't be able to unless
Agent::Message and Agent::Transport & co have also been shared.
It would be much nicer if I could solve all your problems by writing some
magic code that would solve all your problems. Unfortunately I have better
things to do (like giving myself swirlies :), so I give you the standard
CAVEAT EMPTOR:
The Safe module itself is only as secure as you make it!
+---
Steve Purkis
October 2, 1998
examples/Template.pa view on Meta::CPAN
Describe how your agent I<should> be used with some example code, i.e.:
use Agent;
my $agent = new Agent( Name => 'Template', %args );
$agent->run;
=head1 DESCRIPTION
Describe what your agent does in this section.
=head1 PARAMETERS
Describe any parameters your constructor might take, i.e.:
Param1 => description
=head1 NOTES
Anything the user might find useful to know.
( run in 0.816 second using v1.01-cache-2.11-cpan-39bf76dae61 )