Agent-TCLI
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
# Note: this file was auto-generated by Module::Build::Compat version 0.03
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build now from CPAN?', 'y');
unless ($yn =~ /^y/i) {
die " *** Cannot install without Module::Build. Exiting ...\n";
}
require Cwd;
require File::Spec;
require CPAN;
lib/Agent/TCLI/Control.pm view on Meta::CPAN
=item owner
Contains the owning session of the control. This allows the control to be
passed around between sessions and whatever session that has it can
send back to the top level originating session.
=cut
my @owner :Field( 'All' => 'owner' );
=item prompt
The promt that the control is displaying, when appropriate.
=cut
my @prompt :Field :All('prompt');
=item local_address
The local IP address of the system
=cut
my @local_address :Field
:All('local_address');
=item hostname
lib/Agent/TCLI/Control.pm view on Meta::CPAN
#
# } else {
#
# $self->Verbose("init: User commands not an array ref, not loaded");
# $self->Verbose("init: Dump of commands ", 4, $commands[$$self]);
#
# } #end if commands
if ( defined( $hostname[$$self] ) )
{
$self->set(\@prompt, $id[$$self]." [".$hostname[$$self]."]: ");
}
}
=item Register
Register is an internal object method used to register commands with the Control.
=cut
sub Register {
lib/Agent/TCLI/Transport/Test.pm view on Meta::CPAN
B<SendChangeContext> is a POE event handler required for all Transports. Well,
all I<other> Transports, as this one still thinks it is special enough not to
need to do anything here.
=cut
sub SendChangeContext {
my ($kernel, $self, $control ) =
@_[KERNEL, OBJECT, ARG0 ];
# for jabber, we announce context with presence.
# for a terminal, it might be a prompt...
$self->Verbose($self->alias.":SendChangeContext: for control".$control->id());
}
=item SendRequest
B<SendRequest> is a POE event handler that is required for all Transports.
It takes a Agent::TCLI::Request as an argument
=cut
lib/Agent/TCLI/Transport/XMPP.pm view on Meta::CPAN
$self->Verbose("TransmitResponse: Sending to xmpp for $addressee", 1);
$self->xmpp->Send($msg);
}
sub SendChangeContext {
my ($kernel, $self, $control ) =
@_[KERNEL, OBJECT, ARG0 ];
# for xmpp, we announce context with presence.
# for a terminal, it might be a prompt...
$self->Verbose("SendChangeContext: for control ".$control->id());
# Todo, what happens with a groupchat?
my $presence = Net::XMPP::Presence->new(
'to' => $control->get_jid(),
'status' => 'Available',
'priority' => '1',
'type' => $control->print_context,
);
( run in 0.785 second using v1.01-cache-2.11-cpan-6aa56a78535 )