ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Strict.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Strict.pm (file contents):
Revision 1.10 by root, Wed Apr 1 14:02:27 2009 UTC vs.
Revision 1.12 by root, Thu Apr 23 22:44:30 2009 UTC

104sub child { 104sub child {
105 my $class = shift; 105 my $class = shift;
106 my %arg = @_; 106 my %arg = @_;
107 107
108 ref $arg{cb} 108 ref $arg{cb}
109 or croak "AnyEvent->signal called with illegal cb argument '$arg{cb}'"; 109 or croak "AnyEvent->child called with illegal cb argument '$arg{cb}'";
110 delete $arg{cb}; 110 delete $arg{cb};
111 111
112 $arg{pid} =~ /^-?\d+$/ 112 $arg{pid} =~ /^-?\d+$/
113 or croak "AnyEvent->signal called with illegal pid value '$arg{pid}'"; 113 or croak "AnyEvent->child called with malformed pid value '$arg{pid}'";
114 delete $arg{pid}; 114 delete $arg{pid};
115 115
116 croak "AnyEvent->signal called with unsupported parameter(s) " . join ", ", keys %arg 116 croak "AnyEvent->child called with unsupported parameter(s) " . join ", ", keys %arg
117 if keys %arg; 117 if keys %arg;
118 118
119 $class->SUPER::child (@_) 119 $class->SUPER::child (@_)
120}
121
122sub idle {
123 my $class = shift;
124 my %arg = @_;
125
126 ref $arg{cb}
127 or croak "AnyEvent->idle called with illegal cb argument '$arg{cb}'";
128 delete $arg{cb};
129
130 croak "AnyEvent->idle called with unsupported parameter(s) " . join ", ", keys %arg
131 if keys %arg;
132
133 $class->SUPER::idle (@_)
120} 134}
121 135
122sub condvar { 136sub condvar {
123 my $class = shift; 137 my $class = shift;
124 my %arg = @_; 138 my %arg = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines