table of contents
Git::Sub(3pm) | User Contributed Perl Documentation | Git::Sub(3pm) |
NAME¶
Git::Sub - git commands imported as System::Sub subs in the git:: namespace
VERSION¶
version 0.163320
SYNOPSIS¶
use Git::Sub qw(clone tag push); # Git commands are now Perl subs git::clone 'git://github.com/dolmen/p5-Git-Sub.git'; git::tag -a => -m => "Release v$version", "v$version"; git::push qw(--tags origin master); # Commands names with '-' are imported with '_' my $master = git::rev_parse 'release'; # Return in list context is lines (see System::Sub) say for git::ls_tree 'master'; # Process lines using a callback git::ls_tree 'master' => sub { my ($mode, $type, $object, $file) = split; say $file; };
DESCRIPTION¶
Use git <http://www.git-scm.com> commands easily from your Perl program. Each git command is imported as a System::Sub DWIM sub.
EXAMPLES¶
- •
- The release script <https://github.com/dolmen/angel-PS1/blob/devel/dist> of my angel-PS1 <https://github.com/dolmen/angel-PS1> project.
AUTHOR¶
Olivier Mengué, "dolmen@cpan.org".
COPYRIGHT & LICENSE¶
Copyright © 2016 Olivier Mengué.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
2022-11-30 | perl v5.36.0 |