]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Apache/MVC.pm
Refactor to move out ->{ar} to Apache::MVC.
[maypole.git] / lib / Apache / MVC.pm
index 0b1c87333838ce56fd0a679d6f9f036639c2f199..0f917752bf419cc0942a1cf91f65f7a27100ad56 100644 (file)
@@ -27,6 +27,19 @@ sub parse_location {
     $self->{query}  = { $self->{ar}->args };
 }
 
+sub send_output {
+    my $r = shift;
+    $r->{ar}->content_type($r->{content_type});
+    $r->{ar}->headers_out->set("Content-Length" => length $r->{output});
+    $r->{ar}->send_http_header;
+    $r->{ar}->print($r->{output});
+}
+
+sub get_template_root {
+    my $r = shift;
+    $r->{ar}->document_root . "/". $r->{ar}->location;
+}
+
 1;
 
 =head1 NAME