]> Dogcows Code - chaz/p5-Catalyst-Plugin-Sitemap/blob - t/lib/TestApp/Controller/Root.pm
change for WWW::Sitemap::XML
[chaz/p5-Catalyst-Plugin-Sitemap] / t / lib / TestApp / Controller / Root.pm
1 package TestApp::Controller::Root;
2
3 use strict;
4 use warnings;
5
6 use parent 'Catalyst::Controller';
7
8 sub sitemap : Path('/sitemap') {
9 my ( $self, $c ) = @_;
10 $c->res->body( $c->sitemap_as_xml );
11 }
12
13 sub dynamic :Path('/dynamic') {
14 my ( $self, $c ) = @_;
15
16 $c->sitemap->add( "http://localhost/sumfin" ); #''.$c->uri_for( '/sumfin' ) );
17
18 $c->res->body( 'dynamic it is' );
19 }
20
21 sub alone :Local :Sitemap { }
22
23 sub with_priority :Local :Sitemap(0.75) { }
24
25 sub with_function :Local :Sitemap(*) { }
26
27 sub with_function_sitemap {
28 $_[2]->add( 'http://localhost/root/with_function' );
29 }
30
31 sub with_args :Local
32 :Sitemap( lastmod => 2010-09-27, changefreq => daily )
33 {}
34
35
36 1;
37
38
39
40
41
42
This page took 0.036017 seconds and 4 git commands to generate.