Fix to cgi_maypole.t (bug 11346)
Fix to TT error reporting (bug 13991)
Template xhtml validation (bug 13975)
+ Simplified Net::Amazon example (bug 14073)
+ Apache2 fix in Apache::MVC (bug 13888)
2.10 Tue 19 Jul 2005
Multiple Template Paths added ( http://rt.cpan.org/NoAuth/Bug.html?id=13447 )
package Apache::MVC;
-our $VERSION = '2.09';
+our $VERSION = '2.10';
use strict;
use warnings;
use base 'Maypole';
-use mod_perl;
use Maypole::Headers;
-use constant APACHE2 => $mod_perl::VERSION >= 1.99;
+BEGIN {
+ my $version;
+ eval 'use mod_perl2; $version = $mod_perl2::VERSION; ';
+ if ($@) {
+ warn "no mod_perl 2.x using mod_perl 1.x\n";
+ use mod_perl;
+ $version = 0;
+ require Apache;
+ require Apache::Request;
+ } else {
+ require Apache2::RequestIO;
+ require Apache2::RequestRec;
+ require Apache2::RequestUtil;
+ require APR::URI;
+ require Apache2::Request;
+ }
+
+ use constant APACHE2 => $version;
-if (APACHE2) {
- require Apache2;
- require Apache::RequestIO;
- require Apache::RequestRec;
- require Apache::RequestUtil;
- require APR::URI;
}
-else { require Apache }
-require Apache::Request;
sub get_request {
my ( $self, $r ) = @_;
- $self->{ar} = Apache::Request->new($r);
+ $self->{ar} = (APACHE2) ? Apache2::Request->new($r) : Apache::Request->new($r);
}
sub parse_location {