Git::R...n::Log(3pm)
π Git::R...n::Log(3pm) β aka the perl manual page, bestie edition π
okay so this is a page from the perl manual (User Contributed Perl Documentation, to be exact), and it's about Git::Repository::Plugin::Log. yes the title is literally Git::R...n::Log(3pm) because terminal people love abbreviating things. sit down, grab a snack π, we're doing this.
β¨ NAME β¨
Git::Repository::Plugin::Log β bestie, this adds a log() method to Git::Repository. that's the whole vibe. π
β¨ SYNOPSIS β¨
# load the plugin
use Git::Repository 'Log';
my $r = Git::Repository->new();
# get all log objects
my @logs = $r->log(qw( --since=yesterday ));
# get an iterator
my $iter = $r->log(qw( --since=yesterday ));
while ( my $log = $iter->next() ) {
...;
}
look at that. immaculate. you load the plugin, you make a repo object, and then you either grab all the log objects at once or you get a lil iterator and pull them one at a time like a sensible person. π
β¨ DESCRIPTION β¨
This module adds a new method to Git::Repository. that's it, that's the description, and honestly? iconic for being so short. π
β¨ METHOD β¨
π log
# iterator
my $iter = $r->log( @args );
# all Git::Repository::Log objects obtained from the log
my @logs = $r->log( @args );
So log runs git log with whatever arguments you hand it. fr fr, that's the job.
Now here's the context tea, and it matters:
- In scalar context, you get back a
Git::Repository::Log::Iteratorobject, and that thing hands youGit::Repository::Logobjects on demand. lazy loading, we love to see it. π¦ - In list context, you get the full list of
Git::Repository::Logobjects. and bestie... > heads up: this can be very memory-intensive. π like, it's gonna hold everything at once, so know what you're doing.
For the details on how the parameters get handled, go read Git::Repository::Log::Iterator's documentation. that's where the parameter lore lives. π
β¨ ACKNOWLEDGEMENTS β¨
Many thanks to Aristotle Pagaltzis, who requested a log() method in the first place β like, the whole reason this exists β and for very interesting conversations on the topic. we stan a collaborator. π«Ά
β¨ SEE ALSO β¨
Git::Repository::PluginGit::Repository::Log::IteratorGit::Repository::Log
go read all three, they're the friend group. π
β¨ COPYRIGHT β¨
Copyright 2010-2016 Philippe Bruhat (BooK), all rights reserved.
β¨ LICENSE β¨
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. β¨
and that's the whole page, bestie!! π this was Git::R...n::Log(3pm) from perl v5.34.0, dated 2022-06-14. slay, go run some git log. π
π₯
π¦ where this page comes from
- debian bookworm: libgit-repository-plugin-log-perl 1.314-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgit-repository-plugin-log-perl 1.314-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgit-repository-plugin-log-perl 1.314-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgit-repository-plugin-log-perl 1.314-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgit-repository-plugin-log-perl 1.314-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms