Git::Repository::Plugin::Log - Add a log() method to Git::Repository
# 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() ) { ...; }
This module adds a new method to Git::Repository.
Git::Repository
Run git log with the given arguments.
git log
In scalar context, returns a Git::Repository::Log::Iterator object, which can return Git::Repository::Log objects on demand.
Git::Repository::Log::Iterator
Git::Repository::Log
In list context, returns the full list Git::Repository::Log objects. Note that this can be very memory-intensive.
See Git::Repository::Log::Iterator's documentation for details about how parameters are handled.
Philippe Bruhat (BooK), <book at cpan.org>
<book at cpan.org>
Many thanks to Aristotle Pagaltzis who requested a log() method in the first place, and for very interesting conversations on the topic.
log()
Git::Repository::Plugin, Git::Repository::Log::Iterator, Git::Repository::Log.
Copyright 2010 Philippe Bruhat (BooK).
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Git::Repository, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::Repository
CPAN shell
perl -MCPAN -e shell install Git::Repository
For more information on module installation, please visit the detailed CPAN module installation guide.