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.4 by root, Wed Jul 9 11:00:02 2008 UTC vs.
Revision 1.5 by root, Wed Jul 9 11:53:40 2008 UTC

1=head1 NAME
2
3AnyEvent::Strict - force strict mode on for the whole process
4
5=head1 SYNOPSIS
6
7 use AnyEvent::Strict;
8 # struct mode now switched on
9
10=head1 DESCRIPTION
11
12This module implements AnyEvent's strict mode.
13
14Loading it makes AnyEvent check all arguments to AnyEvent-methods, at the
15expense of being slower (often the argument checking takes longer than the
16actual fucntion).
17
18Normally, you don't load this module yourself but instead use it
19indirectly via the C<PERL_ANYEVENT_STRICT> environment variable (see
20L<AnyEvent>). However, this module can be loaded at any time.
21
22=cut
23
1package AnyEvent::Strict; 24package AnyEvent::Strict;
2 25
3# supply checks for argument validity for many functions 26use Carp qw(croak);
4# this is an internal module. although it could be loaded
5# at any time, this is not really documented.
6 27
7use Carp qw(croak);
8use AnyEvent (); 28use AnyEvent ();
9 29
10AnyEvent::post_detect { 30AnyEvent::post_detect {
11 # assume the first ISA member is the implementation 31 # assume the first ISA member is the implementation
12 # # and link us in before it in the chain. 32 # # and link us in before it in the chain.
125 and croak "AnyEvent->now wrongly called with paramaters"; 145 and croak "AnyEvent->now wrongly called with paramaters";
126 146
127 $class->SUPER::now (@_) 147 $class->SUPER::now (@_)
128} 148}
129 149
1301 1501;
151
152=head1 AUTHOR
153
154 Marc Lehmann <schmorp@schmorp.de>
155 http://home.schmorp.de/
156
157=cut
158

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines