summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-01-06 10:43:20 -0600
committerJesse Luehrs <doy@tozt.net>2012-01-06 10:43:20 -0600
commitc5c92e9d24e16bf2f7e65196523070f497630a1b (patch)
tree5a218a89086f8c61fa57570bfdf637b038eb94dc
parentf37c8c6a403486522d197d9749ab3c7e7d9105ab (diff)
downloadcircular-require-c5c92e9d24e16bf2f7e65196523070f497630a1b.tar.gz
circular-require-c5c92e9d24e16bf2f7e65196523070f497630a1b.zip
update docs
-rw-r--r--lib/circular/require.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/circular/require.pm b/lib/circular/require.pm
index 184c361..f80c035 100644
--- a/lib/circular/require.pm
+++ b/lib/circular/require.pm
@@ -35,6 +35,17 @@ load time (C<make_immutable> in L<Moose> classes, for example). This module
generates a warning whenever a module is skipped due to being loaded, if that
module has not finished executing.
+This module works as a pragma, and typically pragmas have lexical scope.
+Lexical scope doesn't make a whole lot of sense for this case though, because
+the effect it's tracking isn't lexical (what does it mean to disable the pragma
+inside of a cycle vs. outside of a cycle? does disabling it within a cycle
+cause it to always be disabled for that cycle, or only if it's disabled at the
+point where the warning would otherwise be generated? etc.), but dynamic scope
+(the scope that, for instance, C<local> uses) does, and that's how this module
+works. Saying C<no circular::require> enables the module for the current
+dynamic scope, and C<use circular::require> disables it for the current dynamic
+scope. Hopefully, this will just do what you mean.
+
In some situations, other modules might be handling the module loading for
you - C<use base> and C<Class::Load::load_class>, for instance. To avoid these
modules showing up as the source of cycles, you can use the C<-hide> parameter
@@ -151,8 +162,7 @@ sub _mod2pm {
=head1 CAVEATS
This module works by overriding C<CORE::GLOBAL::require>, and so other modules
-which do this may cause issues if they aren't written properly. This also means
-that the effect is global, but this is typically the most useful usage.
+which do this may cause issues if they aren't written properly.
=head1 BUGS