Agent-TCLI-Package-Net

 view release on metacpan or  search on metacpan

bin/agent_net.pl  view on Meta::CPAN

#!/usr/bin/perl
#
# $Id: agent_net.pl 56 2007-04-26 23:16:29Z hacker $
#
# This is a working example of a TCLI Agent program.

use warnings;
use strict;
use Pod::Usage;

=head1 NAME

agent_net - Run a TCLI Agent with the Net packages enabled.

=head1 SYNOPSIS

=over 12

=item B<agent_net>

B<username>S<=>I<username>
B<password>S<=>I<password>
B<domain>S<=>I<domain>
[B<resource>S<=>I<resource>]
[B<host>S<=>I<XMPP server>]
[B<help>]
[B<man>]
[B<verbose>]

=back

=head1 OPTIONS AND ARGUMENTS

=over 8

=item B<username>

The XMPP user the Agent will log in as, without the domain.
Required unless the script has been edited to enable a default user.

=item B<password>

The password to be used by the Agent to log in to the XMPP server.
Required unless the script has been edited to enable a default password.

=item B<domain>

The XMPP domain of the user account of the Agent.
Required unless the script has been edited to enable a default domain.

=item B<resource>

The XMPP resource. Defaults to 'tcli' if not provided.

=item B<host>

The XMPP server host, if different from the domain. Defaults to the
domain if not provided.

=item B<verbose>

The desired level of verbosity to use. Repeat for more effect.

=item B<help>

Print a brief help message and exit.

=item B<man>

Print this command's manual page and exit.

=back

=head1 DESCRIPTION

B<agent_net> will start a TCLI Agent running on the XMPP Transport
with the Net, Tail and XMPP packages loaded.

Use B<agent_net> as is or as the basis for creating Agents with different
functionaity.

=head1 SEE ALSO

L<Agent::TCLI>

L<Agent::TCLI::Package::Net>

=head1 AUTHOR

Eric Hacker E<lt>hacker at cpan.orgE<gt>

=head1 LICENSE

Copyright (c) 2007, Alcatel Lucent, All rights resevred.

This script is free software; you may redistribute it
and/or modify it under the same terms as Perl itself.

=cut

# Useful for debugging or just seeing what the Agent is doing.
sub VERBOSE () { 0 }

# Process optional parameters from the command line and assign defaults.
use Getopt::Lucid qw(:all);

my ($opt, $verbose,$domain,$username,$password,$resource,$host);

eval {$opt = Getopt::Lucid->getopt([



( run in 1.702 second using v1.01-cache-2.11-cpan-13bb782fe5a )