ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/Base.pm
(Generate patch)

Comparing AnyEvent-MP/MP/Base.pm (file contents):
Revision 1.2 by root, Sun Aug 2 14:52:41 2009 UTC vs.
Revision 1.3 by root, Mon Aug 3 14:47:25 2009 UTC

3AnyEvent::MP::Base - basis for AnyEvent::MP and Coro::MP 3AnyEvent::MP::Base - basis for AnyEvent::MP and Coro::MP
4 4
5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 # use AnyEvent::MP or Coro::MP instead 7 # use AnyEvent::MP or Coro::MP instead
8
9=head1 DESCRIPTION
10
11This module provides most of the basic functionality of AnyEvent::MP,
12exposed through higher level interfaces such as L<AnyEvent::MP> and
13L<Coro::MP>.
8 14
9=cut 15=cut
10 16
11package AnyEvent::MP::Base; 17package AnyEvent::MP::Base;
12 18
26 32
27our $DEFAULT_SECRET; 33our $DEFAULT_SECRET;
28 34
29our $CONNECT_INTERVAL = 5; # new connect every 5s, at least 35our $CONNECT_INTERVAL = 5; # new connect every 5s, at least
30our $CONNECT_TIMEOUT = 30; # includes handshake 36our $CONNECT_TIMEOUT = 30; # includes handshake
37
38our $WARN = sub {
39 warn "$_[0]\n";
40};
31 41
32sub nonce($) { 42sub nonce($) {
33 my $nonce; 43 my $nonce;
34 44
35 if (open my $fh, "</dev/urandom") { 45 if (open my $fh, "</dev/urandom") {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines