sub assign { my $self = shift; return if ($self->{'assign'} && $self->{'assign'}->(@_)); $self->SUPER::assign(@_); }
sub augment { my $self = shift; return if ($self->{'augment'} && $self->{'augment'}->(@_)); $self->SUPER::augment(@_); }
sub diminish { my $self = shift; return if ($self->{'diminish'} && $self->{'diminish'}->(@_)); $self->SUPER::diminish(@_); }
sub reset { my $self = shift; return if ($self->{'reset'} && $self->{'reset'}->(@_)); $self->SUPER::reset(@_); }
Net::PSYC::Event - Event wrapper for various event systems.
Net::PSYC::Event offers an interface to easily use Net::PSYC with different Event systems. It currently offers support for Event.pm, IO::Select and Gtk2.
# load Net::PSYC::Event for Gtk2 eventing. use Net::PSYC qw(Event=Gtk2); use Net::PSYC::Event qw(register_uniform unregister_uniform start_loop); bind_uniform('psyc://example.org/'); register_uniform('psyc://example.org/@chatroom'); sub msg { my ($source, $mc, $data, $vars) = @_; # lets do some conferencing } start_loop() # start the event-loop
Registers $object or the calling package for all incoming messages targeted at $unl. Calls
$object->msg( $source, $mc, $data, $vars ) or
caller()::msg( $source, $mc, $data, $vars )
for every incoming PSYC packet.
Unregister an $unl. No more packages will be delivered for that $unl thenceforward.
Start the Event loop.
Stop the Event loop.
Start watching for events on $fd. $fd may be a GLOB or an IO::Handle object. $flags may be r, w or e (data to be read, written or pending exceptions) or any combination.
If $repeat is set to 0 the callback will only be called once (revoke() may be used to reactivate it). If you don't want one-shot events either leave $repeat out or set it to 1.
Add a timer event. The event will be triggered after $time seconds. This is a one-shot event by default. However, if $repeat is set to 1, $callback will be called every $time seconds until the event is removed.
One-shot timer events are removed automatically and revoke is not possible for them.
Remember: You are not using a real-time system. The accuracy of timer events depends heavily on other events pending, io-operations and system load in general.
Stop watching for events on $fd. Different types can not be removed seperately if they have been add()ed together!
Removed the timer event associated with the given $id.
Revokes the eventing for $fd. ( one-shot events )
Net::PSYC, Net::PSYC::Client, Net::PSYC::Event::Event, Net::PSYC::Event::IO_Select, Net::PSYC::Event::Gtk2, http://psyc.pages.de/
Arne Gödeke <el@goodavice.pages.de>
Copyright (c) 1998-2005 Arne Gödeke and Carlo v. Loesch. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
7 POD Errors
The following errors were encountered while parsing the POD:
Unknown directive: =state
=cut found outside a pod block. Skipping to next block.
To install Net::PSYC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::PSYC
CPAN shell
perl -MCPAN -e shell install Net::PSYC
For more information on module installation, please visit the detailed CPAN module installation guide.