Git::Sub(3pm)

πŸ“¦
version 0.163320 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸŽ€ 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 🌸

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 Β© 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