Skip Menu |

This queue is for tickets about the Apache-Admin-Config CPAN distribution.

Report information
The Basics
Id: 40155
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Apache-Admin-Config

People
Owner: MARKWHI [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc: nwclark [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.94
Fixed in: 0.95



CC: nwclark [...] cpan.org
Subject: overload in Apache::Admin::Config::Tree
As you can see in http://bbbike.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Apache-Admin-Config;maxver= the value.t test fails on all newer perls (5.10.0, 5.11.0 and 5.8.9-tobe). The reason is very probable this change in perl: [ 30383] Subject: [PATCH blead] Re: [perl #41546] perl 5.8.x bug: overloaded 'eq' does not work with 'nomethod' Message-ID: <20070221215316.GF5646@bort.ca> In Apache::Admin::Config::Tree::to_string I see that for both the "eq" and "ne" operations "ne" is used, and so is for == and !=. This is probably wrong, but worked by accident because of the bug in perl. With the attached patch the behaviour in to_string() is fixed (I think). You also want to increase the minimum perl prereq now, or forbid the overloading stuff for older perls. Regards, Slaven
Subject: Apache-Admin-Config-0.94-overload.patch
# # # 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 -up '/var/tmp/CPAN-build/Apache-Admin-Config-0.94-nzBcpg/lib/Apache/Admin/Config.pm' 'lib/Apache/Admin/Config.pm' Index: ./lib/Apache/Admin/Config.pm --- ./lib/Apache/Admin/Config.pm Sun Jun 4 19:10:14 2006 +++ ./lib/Apache/Admin/Config.pm Sat Oct 18 23:24:19 2008 @@ -1239,7 +1239,7 @@ sub to_string carp "Use of uninitialized value in string eq"; } local $^W; - return($other ne $self->{value}); + return($other eq $self->{value}); } elsif($meth eq 'ne') { @@ -1257,7 +1257,7 @@ sub to_string carp "Use of uninitialized value in numeric eq (==)"; } local $^W; - return($other != $self->{value}); + return($other == $self->{value}); } elsif($meth eq '!=') { #### End of Patch data #### #### ApplyPatch data follows #### # Data version : 1.0 # Date generated : Sat Oct 18 23:25:55 2008 # Generated by : makepatch 2.03 # 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 # p 'lib/Apache/Admin/Config.pm' 41123 1224365059 0100664 #### End of ApplyPatch data #### #### End of Patch kit [created: Sat Oct 18 23:25:55 2008] #### #### Patch checksum: 56 2050 61764 #### #### Checksum: 74 2674 47754 ####
RT-Send-CC: nwclark [...] cpan.org
Bug fixed, tests pass. Uploaded to CPAN and awaiting indexing.