POE::strict - strict mode for POE
POE::strict acts a lot like the strict pragma in perl. It activates
internal constraints that are not normally active. The runtime behavior
of POE will be a lot more strict (duh) and potentially very loud if your
code is in any way questionable as far as the POE core is concerned.
This module can be used as if it were POE itself. Suggested usage is the
removal of all instances of "use POE" and replacing those with "use
use POE::strict qw(Component::Client::TCP);
behaves exactly like
use POE qw(Component::Client::TCP);
(Yeah, yeah, the former is not as semantically nice as the latter. Blame
"#poe". They thought the functionality was a bonus and I agreed.)
The list of activated asserts is as follows:
Assert when dispatching events to nonexistent sessions
Assert if internal parameters are wacky
Yell about receiving unknown events
The constants defined by this module MUST be loaded before POE is. So if
some other module calls "use POE" before POE::strict gets compiled, all
is for naught. You'll probably get some nice redefine warnings and no
strictness. At some point, these constants will be turned into something
a little more runtime friendly. Until then, make sure POE::strict is
what loads up POE.
Matt Cashner (email@example.com)
Copyright (c) 2004, Matt Cashner. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Matt Cashner nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.