From: Charles McGarvey Date: Wed, 29 Feb 2012 19:08:46 +0000 (-0700) Subject: fix compatibility with C::P::SmartURI X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=HEAD;p=chaz%2Fp5-Catalyst-Plugin-Sitemap fix compatibility with C::P::SmartURI --- 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); }