App-UpdateConfig

 view release on metacpan or  search on metacpan

script/update_config  view on Meta::CPAN

    die "Error while executing 'require' guard for ${display_name} '${expr}': $@.\n" if $@;
    printf "Skipping %s due to require guard%s\n", $display_name, ($reason ? ': '.$reason : '')
        unless $flags{silent};
    return 0;
  }
  return 1;
}

# Writes the new content of the target file and executes the POST UPDATE
# command if any.
sub update_target {
  my ($mode, $out_path, $before, $new_content, $after, $conf) = @_;
  if (exists $conf->{symlink}) {
    write_symlink($out_path, $conf->{symlink});
  } elsif ($conf->{entire_file} or $conf->{merge}) {
    write_content($mode, $out_path, $new_content, $conf);
  } else {
    my $content = $before.$conf->{start_marker}.$new_content.$conf->{end_marker}.$after;
    write_content($mode, $out_path, $content, $conf);
  }
  if ($conf->{post_update}) {



( run in 2.527 seconds using v1.01-cache-2.11-cpan-145b269f2f3 )