Mobile-Executive
view release on metacpan or search on metacpan
Executive.pm view on Meta::CPAN
our $VERSION = 2.03;
our @ISA = qw( Exporter );
# We export all the symbols declared in this module by default.
our @EXPORT = qw(
relocate
$absolute_fn
$public_key
$private_key
);
our @EXPORT_OK = qw(
);
our %EXPORT_TAGS = (
);
use constant KEY_ID => 'Mobile::Executive ID';
use constant KEY_SIZE => 1024;
Executive.pm view on Meta::CPAN
# this information during a relocate. Note the use of 'our'.
# We also generate a PK+ and PK- for "users" of this module.
use Crypt::RSA; # Provides authentication and encryption services.
use File::Spec; # Provides filename and path services.
our $absolute_fn = File::Spec->rel2abs( File::Spec->curdir ) . '/' . $0;
my $rsa = new Crypt::RSA;
our ( $public_key, $private_key ) =
$rsa->keygen(
Identity => KEY_ID . "$$" . "$0",
Size => KEY_SIZE,
Password => KEY_PASS . "$0" . "$$",
Verbosity => FALSE
) or die $rsa->errstr, "\n";
}
sub relocate {
Executive.pm view on Meta::CPAN
=over 4
relocate
=back
and it takes two parameters: a IP address (or name) of the remote Location, and the protocol port number that the Location is listening on.
=head1 Internal methods/subroutines
A Perl B<BEGIN> block determines the absolute path to the mobile agents source code file, and puts it into the B<$absolute_fn> scalar (which is automatically exported). This block also generates a PK+/PK- pairing (in B<$public_key> and B<$private_ke...
=head1 RULES FOR WRITING MOBILE AGENTS
There used to be loads, but now there is only one. Read the B<Scooby Guide>, available on-line at: B<http://glasnost.itcarlow.ie/~scooby/guide.html>.
=head1 SEE ALSO
The B<Mobile::Location> class (for creating Locations), and the B<Devel::Scooby> module (for running mobile agents).
The Scooby Website: B<http://glasnost.itcarlow.ie/~scooby/>.
( run in 0.241 second using v1.01-cache-2.11-cpan-4d50c553e7e )