App-Git-Workflow

 view release on metacpan or  search on metacpan

bin/git-hook-setup  view on Meta::CPAN

    shift @data;

    return { @data };
}

sub write_hooks {
    my ($dir, $hooks) = @_;

    for my $hook (keys %{ $hooks } ) {
        my $file = catfile($dir, $hook);
        my $backup = catfile($dir, "$hook~");
        my $count = 1;
        while (-e $backup) {
            $backup = catfile($dir, "$hook$count~");
            $count++;
        }
        system 'cp', $file, $backup;

        my $fh = $file->openw;
        print {$fh} $hooks->{$hook};
        close $fh;
        chmod 0755, $file;
    }
}

=head1 NAME



( run in 1.297 second using v1.01-cache-2.11-cpan-49f99fa48dc )