On Sun, Mar 23, 2008 at 7:49 PM, James Keenan via RT
<[EMAIL PROTECTED]> wrote:
> Hmm, the more I look at this, the more I realize that even the improved
>  version of my patch is not ready for prime time.  While it DWIMs when
>  you call 'perl Configure.pl', it doesn't when you call 'perl
>  Configure.pl --test' (as I do frequently).  We only want
>  MANIFEST.configure.generated to be opened or appended to when we are
>  actually configuring -- not when we're running tests either
>  pre-configuration or during 'make test'.
>
>  Any ideas as to how this might be salvaged?
>
i suggest have the functions that write to files check as to whether
they should write or not.
of course, DRY suggests that's best handled by calling another function.

for example,

sub append_configure_log {
    my $target = shift;
    return if $conf->i_should_not_append_the_configure_log($target);
    ...
}

~jerry

Reply via email to