Apache-Test
    
    
  
  
  
view release on metacpan or search on metacpan
lib/Apache/TestRun.pm view on Meta::CPAN
    my $cfg_top_dir = $cfg->{vars}->{top_dir};
    return unless $cfg_top_dir;
    return if $cfg_top_dir eq $cur_top_dir;
    # if that's the case silently fixup the saved config to use the
    # new paths, and force a complete cleanup. if we don't fixup the
    # config files, the cleanup process won't be able to locate files
    # to delete and re-configuration will fail
    {
        # in place editing
        local @ARGV = $config_file;
        local $^I = ".bak";  # Win32 needs a backup
        while (<>) {
            s{$cfg_top_dir}{$cur_top_dir}g;
            print;
        }
        unlink $config_file . $^I;
    }
    my $cleanup_cmd = "$^X $0 -clean";
    warning "cleaning up the old config";
( run in 0.558 second using v1.01-cache-2.11-cpan-c333fce770f )