-You should also set up relationships between your classes, such that,
-for instance, calling C<brewery> on a C<BeerDB::Beer> object returns an
-object representing its associated brewery.
+ # Reconstruct the request headers
+ $self->headers_in(Maypole::Headers->new);
+ my %headers;
+ if (APACHE2) { %headers = %{$self->ar->headers_in};
+ } else { %headers = $self->ar->headers_in; }
+ for (keys %headers) {
+ $self->headers_in->set($_, $headers{$_});
+ }
+ my $path = $self->ar->uri;
+ my $loc = $self->ar->location;
+ {
+ no warnings 'uninitialized';
+ $path .= '/' if $path eq $loc;
+ $path =~ s/^($loc)?\///;
+ }
+ $self->path($path);
+
+ $self->parse_path;
+ $self->parse_args;
+}