AnyEvent-Callback
view release on metacpan or search on metacpan
debian/control view on Meta::CPAN
Build-Depends: debhelper (>= 7), cdbs, libanyevent-perl
Standards-Version: 3.9.2
Priority: extra
VCS-Browser: https://github.com/unera/libanyevent-callback
Package: libanyevent-callback-perl
Depends: ${perl:Depends}, ${misc:Depends}
Architecture: all
Description: callback aggregator for AnyEvent watchers
The module allows You to create callback's hierarchy. Also the module
groups error and result callbacks into one object.
.
Also the module checks if one callback was called by watcher or not.
If a watcher doesn't call result or error callback, error callback will
be called automatically.
.
Also the module checks if a callback was called reentrant. In the case
the module will complain (using "carp" in Carp).
.
If a watcher touches error callback and if superior didn't define error
callback, the module will call error callback upwards hierarchy.
lib/AnyEvent/Callback.pm view on Meta::CPAN
} else { # results
my @res = $_->results;
}
}
});
=head1 DESCRIPTION
The module allows You to create callback's hierarchy. Also the module groups
error and result callbacks into one object.
Also the module checks if one callback was called by watcher or not.
If a watcher doesn't call result or error callback, error callback will be
called automatically.
Also the module checks if a callback was called reentrant. In the case the
module will complain (using L<Carp/carp>).
If a watcher touches error callback and if superior didn't define error
callback, the module will call error callback upwards hierarchy. Example:
lib/AnyEvent/Callback.pm view on Meta::CPAN
$self;
}
sub CBS {
return AnyEvent::Callback::Stack->new;
}
=head2 error
Calls error callback. If the object has no registered error callbacks,
parent object's error callback will be called.
$cb->error('WTF?');
=cut
sub error {
my ($self, @error) = @_;
$self->{ecalled}++;
( run in 0.468 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )