X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FView%2FBase.pm;h=b577364ada5c80511ecb8e7bda4a3b6ca47de072;hb=6f3e2ec142b6dd83d7d4960cf15acd6ca8b73e1d;hp=61c887d3ef0bba3c91922a06ec66de8eb5cecc9c;hpb=5ba93a09518403ae28e8a71b5299e2458a6dfa0b;p=maypole.git diff --git a/lib/Maypole/View/Base.pm b/lib/Maypole/View/Base.pm index 61c887d..b577364 100644 --- a/lib/Maypole/View/Base.pm +++ b/lib/Maypole/View/Base.pm @@ -8,7 +8,7 @@ sub new { bless {}, shift } # By default, do nothing. sub paths { my ( $self, $r ) = @_; - my $root = $r->{config}{template_root} || $r->get_template_root; + my $root = $r->config->template_root || $r->get_template_root; return ( $root, ( @@ -23,7 +23,7 @@ sub paths { sub vars { my ( $self, $r ) = @_; my $class = $r->model_class; - my $base = $r->{config}->{uri_base}; + my $base = $r->config->uri_base; $base =~ s/\/+$//; my %args = ( request => $r, @@ -61,10 +61,10 @@ sub vars { sub process { my ( $self, $r ) = @_; - my $status = $self->template($r); - return $self->error($r) if $status != OK; $r->{content_type} ||= "text/html"; $r->{document_encoding} ||= "utf-8"; + my $status = $self->template($r); + return $self->error($r) if $status != OK; return OK; }