Scroll to navigation

Git::Repository::Plugin::Log(3pm) User Contributed Perl Documentation Git::Repository::Plugin::Log(3pm)
 

NAME

Git::Repository::Plugin::Log - Add a log() method to Git::Repository

VERSION

version 1.312

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() ) {
        ...;
    }

DESCRIPTION

This module adds a new method to Git::Repository.

METHOD

log

   # iterator
   my $iter = $r->log( @args );
   # all Git::Repository::Log objects obtained from the log
   my @logs = $r->log( @args );
Run "git log" with the given arguments.
In scalar context, returns a Git::Repository::Log::Iterator object, which can return Git::Repository::Log objects on demand.
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.

ACKNOWLEDGEMENTS

Many thanks to Aristotle Pagaltzis who requested a "log()" method in the first place, and for very interesting conversations on the topic.

SEE ALSO

Git::Repository::Plugin, Git::Repository::Log::Iterator, Git::Repository::Log.

BUGS

Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=Git-Repository-Plugin-Log or by email to bug-git-repository-plugin-log@rt.cpan.org.
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Philippe Bruhat (BooK) <book@cpan.org>

COPYRIGHT

Copyright 2010-2013 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.
2014-07-23 perl v5.18.2