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.8 by root, Sat Feb 7 22:18:02 2009 UTC vs.
Revision 1.10 by root, Wed Apr 1 14:02:27 2009 UTC

21 21
22=cut 22=cut
23 23
24package AnyEvent::Strict; 24package AnyEvent::Strict;
25 25
26no warnings; # *sigh*
27
26use Carp qw(croak); 28use Carp qw(croak);
27 29
28use AnyEvent (); 30use AnyEvent ();
29 31
30AnyEvent::post_detect { 32AnyEvent::post_detect {
43 or croak "AnyEvent->io called with illegal cb argument '$arg{cb}'"; 45 or croak "AnyEvent->io called with illegal cb argument '$arg{cb}'";
44 delete $arg{cb}; 46 delete $arg{cb};
45 47
46 defined fileno $arg{fh} 48 defined fileno $arg{fh}
47 or croak "AnyEvent->io called with illegal fh argument '$arg{fh}'"; 49 or croak "AnyEvent->io called with illegal fh argument '$arg{fh}'";
50 -f $arg{fh}
51 and croak "AnyEvent->io called with fh argument pointing to a file";
48 delete $arg{fh}; 52 delete $arg{fh};
49 53
50 $arg{poll} =~ /^[rw]$/ 54 $arg{poll} =~ /^[rw]$/
51 or croak "AnyEvent->io called with illegal poll argument '$arg{poll}'"; 55 or croak "AnyEvent->io called with illegal poll argument '$arg{poll}'";
52 delete $arg{poll}; 56 delete $arg{poll};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines