Dist-Banshee

 view release on metacpan or  search on metacpan

lib/Dist/Banshee/Mint.pm  view on Meta::CPAN

		$function->();
		rmtree('.banshee');
		rename '.banshee-update', '.banshee';
		1;
	} or do {
		rmdir '.banshee-update';
		die $@;
	}
}

sub update_script {
	my ($skeleton_name, $script_name) = @_;

	my $source_dir = catfile(_find_profile($skeleton_name), 'skeleton', '.banshee');

	my $source = catfile($source_dir, $script_name);
	my $sink = catfile('.banshee-update', $script_name);
	my $patch = catfile('.banshee', $script_name . '.patch');
	if ($patch && -f $patch) {
		my $text = read_text($source);
		my $patch = read_text($patch);
		my $output = patch($text, $patch, { STYLE => 'Unified' });
		write_text($sink, $output);
	}
	else {
		copy($source, $sink) or die "Couldn't copy $script_name from $skeleton_name";
	}

	return;
}

sub update_patch {
	my ($skeleton_name, $script_name) = @_;

	my $source_dir = catfile(_find_profile($skeleton_name), 'skeleton', '.banshee');

	my $source = catfile('.banshee', $script_name);
	my $sink = catfile($source_dir, $script_name);
	my $diff = diff($sink, $source, { STYLE => 'Unified' });
	my $patch = "$source.patch";

	if (length $diff) {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.596 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )