Git::Sub(3pm)
π Git::Sub π
okay bestie, listen up β this is a page from the User Contributed Perl Documentation, and it's literally about Git::Sub, which brings git commands straight into your Perl as System::Sub subs living in the git:: namespace. no cap. π¦
β¨ 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;
};
like, look at that. <pink>git commands but they're just... Perl subs now</pink>. iconic behavior fr fr π
π¦ 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. β¨
that's the whole vibe β you want git, you get git, but it's Perl and it's gorgeous and it just works. no shelling out and hand-parsing nonsense required. periodt. π
πΈ EXAMPLES πΈ
- The release script (
<https://github.com/dolmen/angel-PS1/blob/devel/dist>) of my angel-PS1 (<https://github.com/dolmen/angel-PS1>) project. π«Ά
ngl, real-world receipts >>> everything. this is somebody's actual release workflow, and it's giving main character energy. π
π§ 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. π₯
bestie this is the important bit: same terms as Perl 5 itself. free software, do your thing, just respect the license. no funny business. π
and that's the whole page, you ate it up π this was perl v5.36.0, dated 2022-11-30, straight out of the Git::Sub(3pm) page β mwah, go forth and git::push responsibly. ππ¦β¨
π¦ where this page comes from
- debian bookworm: libgit-sub-perl 0.163320-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgit-sub-perl 0.163320-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgit-sub-perl 0.163320-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libgit-sub-perl 0.163320-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms