You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by ge...@apache.org on 2006/03/09 01:56:58 UTC

svn commit: r384392 - in /perl/Apache-Test/trunk: Changes lib/Apache/TestConfig.pm

Author: geoff
Date: Wed Mar  8 16:56:58 2006
New Revision: 384392

URL: http://svn.apache.org/viewcvs?rev=384392&view=rev
Log:
force reconfiguration if existing configuration was generated
by an older version of Apache-Test

Modified:
    perl/Apache-Test/trunk/Changes
    perl/Apache-Test/trunk/lib/Apache/TestConfig.pm

Modified: perl/Apache-Test/trunk/Changes
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/Changes?rev=384392&r1=384391&r2=384392&view=diff
==============================================================================
--- perl/Apache-Test/trunk/Changes (original)
+++ perl/Apache-Test/trunk/Changes Wed Mar  8 16:56:58 2006
@@ -8,6 +8,9 @@
 
 =item 1.29-dev
 
+force reconfiguration if existing configuration was generated
+by an older version of Apache-Test [Geoffrey Young]
+
 the -t_pid_file code resulted in confusing and fatal error message
 for people using stale 1.27 configurations.  so take steps to make
 sure things continue to work.  [Geoffrey Young]

Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=384392&r1=384391&r2=384392&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Wed Mar  8 16:56:58 2006
@@ -1658,6 +1658,17 @@
         }
     }
 
+    # if the generated config was created with a version of Apache-Test
+    # less than the current version
+    {
+      my $current = Apache::Test->VERSION;
+      my $config  = $self->{apache_test_version};
+
+      if (! $config || $config < $current) {
+          push @reasons, "configuration generated with old Apache-Test";
+      }
+    }
+
     return @reasons;
 }
 
@@ -1838,6 +1849,9 @@
     my($self) = @_;
 
     return unless $self->{save};
+
+    # add in the Apache-Test version for later comparisions
+    $self->{apache_test_version} = Apache::Test->VERSION;
 
     my $name = 'apache_test_config';
     my $file = catfile $self->{vars}->{t_conf}, "$name.pm";