Geoffrey Young wrote:
+ (my $generated = $File::Find::name) =~ s/\.in$//;
+ push @need_update, $generated + unless -e $generated && -M $generated < -M $File::Find::name;


 -    if (my $extra_conf = $self->generate_extra_conf) {
 -        for my $file (@$extra_conf) {
 -            push @reasons, "$file.in is newer than $file"
 -                if -e $file && -M "$file.in" < -M $file;
 -        }


you flipped the logic here.  it needs to be

unless -e $generated && -M $generated > -M $File::Find::name

I don't think so. The two snippets you quoted above aren't the same. I've changed the functionality and changed the order of the arguments. The code:


        push @need_update, $generated
            unless -e $generated && -M $generated < -M $File::Find::name;

says: a generated file needs to be updated, unless it already exists and it's younger than its source file.

In other words, update the file if it doesn't exist or if it's older then the source file:

push @need_update, $generated
            if (!-e $generated || -M $generated > -M $File::Find::name);

Am I wrong?

which is equivalent to

  if (! -e extra.conf || ! (extra.conf > extra.conf.in))

right now it reconfigures all the time:

[warning] forcing re-configuration:
[warning]       - t/conf/extra.conf.in is newer than t/conf/extra.conf.

-rw-rw-r--    1 geoff    geoff        1283 Feb 19 09:42 extra.conf
-rw-rw-r--    1 geoff    geoff         353 Feb 19 09:36 extra.conf.in

I bet you see that problem when you do a full reconfigure, no? So, yes, there is a buglet in the comments, not the actual config process. Will fix that shortly.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to