[Bps-public-commit] r14817 - in Path-Dispatcher/trunk: lib/Path/Dispatcher
sartak at bestpractical.com
sartak at bestpractical.com
Tue Aug 5 19:23:26 EDT 2008
Author: sartak
Date: Tue Aug 5 19:23:26 2008
New Revision: 14817
Modified:
Path-Dispatcher/trunk/ (props changed)
Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm
Log:
r54135 at gorgoroth: sartak | 2008-08-05 19:23:23 -0400
"use MyApp::Dispatcher" should not export sugar. but "use MyFramework::Dispatcher -base" should
Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm (original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm Tue Aug 5 19:23:26 2008
@@ -24,8 +24,14 @@
no strict 'refs';
push @{ $pkg . '::ISA' }, $self;
}
+ else {
+ # we don't want our subclasses exporting our sugar
+ # unless the user specifies -base
+ return if $self ne __PACKAGE__;
+ }
local $CALLER = $pkg;
+
$exporter->($self, @args);
}
More information about the Bps-public-commit
mailing list