AnyEvent-FTP
view release on metacpan or search on metacpan
- IP
- unparsed
- fget
- fput
- fls
- aeftpd
- CDPATH
- CHECKMETHOD
- CHECKSUM
- cb
- callbacks
- callback
- pl
- APPE
- CDUP
- CWD
- DELE
- MKD
- NLST
- PWD
- Readonly
lib/AnyEvent/FTP/Role/Event.pm view on Meta::CPAN
print "failed: $message";
});
$foo->some_method
=head1 DESCRIPTION
This role provides a uniform even callback mechanism for classes in L<AnyEvent::FTP>.
You declare events by using the C<define_events> method. Once declared
you can use C<on_>I<event_name> to add a callback to a particular event
and C<emit> to trigger those callbacks.
=head1 METHODS
=head2 define_events
__PACKAGE__->define_events( @list_of_event_names );
This is called within the class package to declare the event names for all
events used by the class. It creates methods of the form C<on_>I<event_name>
which can be used to add callbacks to events.
=head2 emit
$obj->emit($event_name, @arguments);
This calls the callbacks associated with the given C<$event_name>.
It will pass to that callback the given C<@arguments>.
=head1 SEE ALSO
=over 4
=item *
L<AnyEvent::FTP>
( run in 0.245 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )