- moved doc/*.pod to lib/Maypole/Manual
- added Maypole::Model::Base::is_public() to make it simple to overload
:Exported behavior
+ - added rewrite_path()
1.7 Sat Jul 17 20:15:26 BST 2004
- Emergency release - we lost the "use Maypole::Constants" from
my $loc = $self->{ar}->location;
no warnings 'uninitialized';
$self->{path} =~ s/^($loc)?\///;
+ $self->rewrite_path;
$self->parse_path;
$self->parse_args;
}
my $loc = $self->{cgi}->url( -absolute => 1 );
no warnings 'uninitialized';
$self->{path} =~ s/^($loc)?\///;
+ $self->rewrite_path;
$self->parse_path;
$self->parse_args;
}
$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}).\n".
- "Available tables are: ".join (",", @{ $config->{display_tables} })
+ warn "We don't have that table ($self->{table}).\n"
+ . "Available tables are: "
+ . join( ",", @{ $config->{display_tables} } )
if $self->debug
and not $config->ok_tables->{ $self->{table} };
return DECLINED() unless exists $config->ok_tables->{ $self->{table} };
sub exception { return ERROR }
+sub rewrite_path { }
+
sub parse_path {
my $self = shift;
$self->{path} ||= "frontpage";
sub parse_location {
my $self = shift;
- my $url = URI->new(shift @ARGV);
- my $root = URI->new($self->config->uri_base)->path;
+ my $url = URI->new( shift @ARGV );
+ my $root = URI->new( $self->config->uri_base )->path;
$self->{path} = $url->path;
$self->{path} =~ s/^$root//i if $root;
+ $self->rewrite_path;
$self->parse_path;
$self->parse_args($url);
}