From 0a08e4059eada5306e122196217cccc3acc07864 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Wed, 29 Feb 2012 12:08:46 -0700 Subject: [PATCH] fix compatibility with C::P::SmartURI --- lib/Catalyst/Plugin/Sitemap.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Catalyst/Plugin/Sitemap.pm b/lib/Catalyst/Plugin/Sitemap.pm index 7b17271..e408855 100644 --- a/lib/Catalyst/Plugin/Sitemap.pm +++ b/lib/Catalyst/Plugin/Sitemap.pm @@ -32,6 +32,10 @@ sub _build_sitemap { my $sitemap = WWW::Sitemap::XML->new; + if ( $self->can('uri_disposition') ) { + $self->uri_disposition('absolute'); + } + for my $controller ( map { $self->controller($_) } $self->controllers ) { ACTION: for my $a ( $controller->get_action_methods ) { @@ -69,7 +73,7 @@ sub _build_sitemap { %uri_params = @attr; } - $uri_params{loc} = $self->uri_for_action( $action->private_path ); + $uri_params{loc} = ''.$self->uri_for_action( $action->private_path ); $sitemap->add(%uri_params); } -- 2.45.2