__PACKAGE__->config->{namespace} = '';
-sub auto : Private {
- my ( $self, $c ) = @_;
- $c->stash->{'current_view'} = 'TT';
- return 1;
-}
-
sub index :Path Args(0) {}
sub base : Chained('/') PathPart('') CaptureArgs(0) {}
$c->stash->{template} = 'time_include.tt';
}
-sub http : Chained('base') PathPart('') CaptureArgs(0) {
- pop->stash->{'current_view'} = 'TTWithHTTP';
-}
-
-sub http_cpan : Chained('http') Args(0) {}
+sub http_cpan : Chained('base') Args(0) {}
-sub http_github : Chained('http') Args(0) {}
+sub http_github : Chained('base') Args(0) {}
sub end : ActionClass('RenderView') {}
__PACKAGE__->config(
TEMPLATE_EXTENSION => '.tt',
subinclude_plugin => 'Visit',
+ subinclude => {
+ 'HTTP::GET' => {
+ class => 'HTTP',
+ http_method => 'GET',
+ uri_map => {
+ '/cpan/' => 'http://search.cpan.org/~',
+ '/github/' => 'http://github.com/',
+ },
+ },
+ },
);
1;
+++ /dev/null
-package ESITest::View::TTWithHTTP;
-use Moose;
-
-extends 'Catalyst::View::TT';
-with 'Catalyst::View::Component::SubInclude';
-
-__PACKAGE__->config(
- TEMPLATE_EXTENSION => '.tt',
- subinclude_plugin => 'HTTP::GET',
- subinclude => {
- 'HTTP::GET' => {
- class => 'HTTP',
- http_method => 'GET',
- uri_map => {
- '/cpan/' => 'http://search.cpan.org/~',
- '/github/' => 'http://github.com/',
- },
- },
- },
-);
-
-1;
-[% subinclude('/cpan/wreis') %]
+[% subinclude_using('HTTP::GET', '/cpan/wreis') %]
-[% subinclude('/github/wreis') %]
+[% subinclude_using('HTTP::GET', '/github/wreis') %]