AE-AdHoc
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/AE/AdHoc.pm view on Meta::CPAN
errors to magic variables. It is up to the user to check these variables.
=over
=item * C<$AE::AdHoc::errstr> - last error (as in L<::DBI>).
=item * C<@AE::AdHoc::errors> - all errors.
=item * C<$AE::AdHoc::warnings> - set this to false to suppress warnings.
=back
=cut
our @errors;
our $errstr;
our $warnings = 1; # by default, complain loudly
sub _error {
$errstr = shift;
push @errors, $errstr;
carp __PACKAGE__.": ERROR: $errstr" if $warnings;
return;
};
sub _croak {
_error(@_);
croak shift;
};
=head1 CAVEATS
This module is still under heavy development, and is subject to change.
Feature/change requests are accepted.
=head2 Callback confinement
If event loop is entered several times, the callbacks created in one
invocations will NOT fire in another. Instead, they'll issue a warning
and return (see "Error handling" below).
Error message will be like C<ae_send at file:13 from ae_recv[1] at file:12
called in ae_recv[2] at file:117>
This is done so to isolate invocations as much as possible.
However, detection of "this invocation" will go wrong if callback maker is
called in a callback itself. For instance, this will always work the same:
# ...
callback => sub { ae_send->(@_); },
# ...
=cut
=head1 AUTHOR
Konstantin S. Uvarin, C<< <khedin at gmail.com> >>
=head1 BUGS
Please report any bugs or feature requests to C<bug-ae-adhoc at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=AE-AdHoc>. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc AE::AdHoc
You can also look for information at:
=over 4
=item * github:
L<https://github.com/dallaylaen/perl-AE-AdHoc>
=item * RT: CPAN's request tracker
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=AE-AdHoc>
=item * AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/AE-AdHoc>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/AE-AdHoc>
=item * Search CPAN
L<http://search.cpan.org/dist/AE-AdHoc/>
=back
=head1 SEE ALSO
L<AnyEvent>
=head1 ACKNOWLEDGEMENTS
=head1 LICENSE AND COPYRIGHT
Copyright 2012 Konstantin S. Uvarin.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
=cut
1; # End of AE::AdHoc
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.895 second using v1.00-cache-2.02-grep-82fe00e-cpan-72ae3ad1e6da )