]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole.pm
Added support for extra_headers (se Maypole pod)
[maypole.git] / lib / Maypole.pm
index 6e41ee7d3e56f88428bfdd022ce1c04f719762f2..1665ca702573c60c9fbd9ae4a892956e72e64061 100644 (file)
@@ -6,12 +6,13 @@ use warnings;
 use Maypole::Config;
 use Maypole::Constants;
 
-our $VERSION = '2.04';
+our $VERSION = '2.05';
 
 __PACKAGE__->mk_classdata($_) for qw( config init_done view_object );
 __PACKAGE__->mk_accessors(
     qw( ar params query objects model_class template_args output path
-      args action template error document_encoding content_type table)
+        args action template error document_encoding content_type table
+        extra_headers )
 );
 __PACKAGE__->config( Maypole::Config->new() );
 __PACKAGE__->init_done(0);
@@ -23,6 +24,7 @@ sub setup {
     $calling_class = ref $calling_class if ref $calling_class;
     {
         no strict 'refs';
+        no warnings 'redefine';
 
         # Naughty.
         *{ $calling_class . "::handler" } =
@@ -72,6 +74,7 @@ sub handler {
 sub handler_guts {
     my $r = shift;
     $r->model_class( $r->config->model->class_of( $r, $r->{table} ) );
+
     my $applicable = $r->is_applicable;
     unless ( $applicable == OK ) {
 
@@ -274,6 +277,10 @@ A list of remaining parts of the request path after table and action
 have been
 removed
 
+=head3 extra_headers
+
+A hash containing extra headers to be set on a request.
+
 =head3 parse_args
 
 Turns post data and query string paramaters into a hash of C<params>.