Skip Menu |

This queue is for tickets about the Maypole CPAN distribution.

Report information
The Basics
Id: 13888
Status: resolved
Priority: 0/
Queue: Maypole

People
Owner: TEEJAY [...] cpan.org
Requestors: nigel.metheringham [...] Dev.intechnology.co.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 2.09
  • 2.10
Fixed in: 2.11



Subject: mod_perl2 incompatibilities with Apache::MVC
The mod_perl 2.00 release has some differently named modules to the earlier 1.9x release versions, which causes the Apache::MVC module to fail. I have attached a low grade patch which makes things work by converting the module to be mod_perl2 compatible and completely incompatible with earlier versions. Hopefully this can be used to produce a more portable version. Note that Fedora FC4 ships mod_perl 2.01 which shows up this problem. Tested against Maypole 2.09. The Apache::MVC code appears to have no changes in 2.10 so I assume the problem is still present.
# This is a patch for Maypole-2.09.orig to update it to Maypole-2.09 # # To apply this patch: # STEP 1: Chdir to the source directory. # STEP 2: Run the 'applypatch' program with this patch file as input. # # If you do not have 'applypatch', it is part of the 'makepatch' package # that you can fetch from the Comprehensive Perl Archive Network: # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz # In the above URL, 'x' should be 2 or higher. # # To apply this patch without the use of 'applypatch': # STEP 1: Chdir to the source directory. # STEP 2: Run the 'patch' program with this file as input. # #### End of Preamble #### #### Patch data follows #### diff -u 'Maypole-2.09.orig/lib/Apache/MVC.pm' 'Maypole-2.09/lib/Apache/MVC.pm' Index: ./lib/Apache/MVC.pm --- ./lib/Apache/MVC.pm Tue Jan 25 22:06:54 2005 +++ ./lib/Apache/MVC.pm Thu May 19 21:08:12 2005 @@ -6,24 +6,20 @@ use warnings; use base 'Maypole'; -use mod_perl; +use mod_perl2; use Maypole::Headers; -use constant APACHE2 => $mod_perl::VERSION >= 1.99; +use constant APACHE2 => $mod_perl2::VERSION >= 1.99; -if (APACHE2) { - require Apache2; - require Apache::RequestIO; - require Apache::RequestRec; - require Apache::RequestUtil; - require APR::URI; -} -else { require Apache } -require Apache::Request; +require Apache2::RequestIO; +require Apache2::RequestRec; +require Apache2::RequestUtil; +require APR::URI; +require Apache2::Request; sub get_request { my ( $self, $r ) = @_; - $self->{ar} = Apache::Request->new($r); + $self->{ar} = Apache2::Request->new($r); } sub parse_location { #### End of Patch data #### #### ApplyPatch data follows #### # Data version : 1.0 # Date generated : Thu May 19 21:08:26 2005 # Generated by : makepatch 2.00_07* # Recurse directories : Yes # Excluded files : (\A|/).*\~\Z # (\A|/).*\.a\Z # (\A|/).*\.bak\Z # (\A|/).*\.BAK\Z # (\A|/).*\.elc\Z # (\A|/).*\.exe\Z # (\A|/).*\.gz\Z # (\A|/).*\.ln\Z # (\A|/).*\.o\Z # (\A|/).*\.obj\Z # (\A|/).*\.olb\Z # (\A|/).*\.old\Z # (\A|/).*\.orig\Z # (\A|/).*\.rej\Z # (\A|/).*\.so\Z # (\A|/).*\.Z\Z # (\A|/)\.del\-.*\Z # (\A|/)\.make\.state\Z # (\A|/)\.nse_depinfo\Z # (\A|/)core\Z # (\A|/)tags\Z # (\A|/)TAGS\Z # (\A|/)\.\#.*\Z # (\A|/)\#.*\Z # (\A|/)_\$.*\Z # (\A|/).*\$\Z # (\A|/)CVS\Z # (\A|/)CVS\.adm\Z # (\A|/)cvslog\..*\Z # (\A|/)\.svn\Z # (\A|/)\,.*\Z # (\A|/).*\,v\Z # (\A|/)RCS\Z # (\A|/)RCSLOG\Z # (\A|/)p\..*\Z # (\A|/)s\..*\Z # (\A|/)SCCS\Z # p 'lib/Apache/MVC.pm' 3931 1116533292 0100644 #### End of ApplyPatch data #### #### End of Patch kit [created: Thu May 19 21:08:26 2005] #### #### Patch checksum: 86 2773 38232 #### #### Checksum: 104 3463 29874 ####
[guest - Wed Jul 27 08:33:55 2005]: Show quoted text
> The mod_perl 2.00 release has some differently named modules to the > earlier 1.9x release versions, which causes the Apache::MVC module > to fail. > > I have attached a low grade patch which makes things work by > converting the module to be mod_perl2 compatible and completely > incompatible with earlier versions. Hopefully this can be used to > produce a more portable version. > > Note that Fedora FC4 ships mod_perl 2.01 which shows up this problem. > > Tested against Maypole 2.09. The Apache::MVC code appears to have no > changes in 2.10 so I assume the problem is still present.
This problem will apply to 2.09 and 2.10. This will have to be fixed in 2.11, but I hope to have a workaround or even proper fix in SVN soon based on your patch.
[guest - Wed Jul 27 08:33:55 2005]: Show quoted text
> The mod_perl 2.00 release has some differently named modules to the > earlier 1.9x release versions, which causes the Apache::MVC module > to fail.
Changes based on the patch have been made to Apache::MVC so that both Apache 1.x and Apache 2.x work correctly. Fixed in SVN 370