Skip to content

Instantly share code, notes, and snippets.

@ocharles
Created March 20, 2010 20:12
Show Gist options
  • Save ocharles/338868 to your computer and use it in GitHub Desktop.
Save ocharles/338868 to your computer and use it in GitHub Desktop.
package TestApp::Controller::Namespace;
use Moose;
BEGIN { extends 'Catalyst::Controller' }
sub main :Local {
my ($self, $c) = @_;
$c->stash( name => 'Bob' );
}
__PACKAGE__->meta->make_immutable;
1;
package TestApp::Controller::Root;
use Moose;
BEGIN { extends 'Catalyst::Controller' }
__PACKAGE__->config(namespace => q{});
sub main :Path {
my ($self, $c) = @_;
$c->stash( name => 'Dave' );
}
sub end : ActionClass('RenderView') {}
__PACKAGE__->meta->make_immutable;
package TestApp;
use Moose;
use namespace::autoclean;
use Catalyst;
extends 'Catalyst';
__PACKAGE__->config(
default_view => 'HTML'
);
__PACKAGE__->setup;
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment