- Removed Maypole::View::Mason as it's distributed separately on CPAN.
- Factory templates are now XHTML 1.1 compliant.
- made the config hash into -> Maypole::Config
+ - accessors for everything
1.7 Sat Jul 17 20:15:26 BST 2004
- Emergency release - we lost the "use Maypole::Constants" from
sub send_output {
my $r = shift;
- $r->{ar}->content_type( $r->{content_type} ."; encoding=".$r->{document_encoding} );
+ $r->{ar}->content_type(
+ $r->{content_type} . "; encoding=" . $r->{document_encoding} );
$r->{ar}->headers_out->set( "Content-Length" => length $r->{output} );
APACHE2 || $r->{ar}->send_http_header;
$r->{ar}->print( $r->{output} );
use strict;
use warnings;
use Maypole::Config;
-our $VERSION = "1.8";
+our $VERSION = '2.0';
__PACKAGE__->mk_classdata($_) for qw( config init_done view_object );
__PACKAGE__->mk_accessors(
- qw( ar params query objects model_class
- args action template )
+ qw( ar params query objects model_class template_args output path
+ args action template error document_encoding content_type table)
);
__PACKAGE__->config( Maypole::Config->new() );
__PACKAGE__->init_done(0);
my $config = $class->config;
$config->view || $config->view("Maypole::View::TT");
$config->view->require;
- die "Couldn't load the view class ".$config->view.": $@" if $@;
- $config->display_tables || $config->display_tables([ $class->config->tables ]);
+ die "Couldn't load the view class " . $config->view . ": $@" if $@;
+ $config->display_tables
+ || $config->display_tables( [ $class->config->tables ] );
$class->view_object( $class->config->view->new );
$class->init_done(1);
return $status;
}
+# The root of all evil
sub handler_guts {
my $r = shift;
$r->model_class( $r->config->model->class_of( $r, $r->{table} ) );
sub is_applicable {
my $self = shift;
my $config = $self->config;
- $config->ok_tables || $config->ok_tables($config->display_tables);
- $config->ok_tables ({ map { $_ => 1 } @{ $config->ok_tables } })
+ $config->ok_tables || $config->ok_tables( $config->display_tables );
+ $config->ok_tables( { map { $_ => 1 } @{ $config->ok_tables } } )
if ref $config->ok_tables eq "ARRAY";
warn "We don't have that table ($self->{table})"
if $self->debug
=head1 THANK YOU
-Jesse Scheidlower, Jody Belka, Marcus Ramberg, Mickael Joanne, Simon Flack,
-Veljko Vidovic and all the others who've helped.
+Danijel Milicevic, Jesse Scheidlower, Jody Belka, Marcus Ramberg,
+Mickael Joanne, Simon Flack, Veljko Vidovic and all the others who've helped.
=head1 LICENSE