]> Dogcows Code - chaz/p5-Catalyst-Plugin-Sitemap/commitdiff
fix compatibility with C::P::SmartURI releases
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 29 Feb 2012 19:08:46 +0000 (12:08 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 29 Feb 2012 19:08:46 +0000 (12:08 -0700)
lib/Catalyst/Plugin/Sitemap.pm

index 7b172711f3807ebe3747a2c7e3768e852f8cd02b..e408855fc55dec89b45772b8a170bbfa32a9d8c4 100644 (file)
@@ -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);
         }
This page took 0.026909 seconds and 4 git commands to generate.