[0.007] ...
+ - used namespace keyword in examples
+ - allow namespace shorcuts in controller role application
[0.006] Sun Aug 16 03:43:10 CEST 2009
- fixed keyword listing method to use new MXD around
use CatalystX::Declare;
+namespace MyApp::Web;
+
# we consume a role that does what the RenderView action class
# would normally do
-controller MyApp::Web::Controller::Root
- with MyApp::Web::ControllerRole::RenderView {
+controller ::Controller::Root
+ with ::ControllerRole::RenderView {
# $CLASS is provided by CLASS.pm
$CLASS->config(namespace => '');
use FindBin;
use lib "$FindBin::Bin/../lib";
+use lib "$FindBin::Bin/../../../lib";
BEGIN { use_ok 'Catalyst::Test', 'MyApp::Web' }
method add_with_option_customizations (Object $ctx, $package, ArrayRef $roles, HashRef $options) {
+ $package = $ctx->qualify_namespace($package);
+
$ctx->add_cleanup_code_parts(
map {
sprintf('Class::MOP::load_class(%s)', pp "$_"),
sprintf('%s->meta->apply(%s->meta)', $_, $package),
- } @$roles
+ } map { $ctx->qualify_namespace($_) } @$roles
);
$ctx->add_cleanup_code_parts(