.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Git::Repository::Log::Iterator 3pm" .TH Git::Repository::Log::Iterator 3pm "2016-05-01" "perl v5.22.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Git::Repository::Log::Iterator \- Split a git log stream into records .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Git::Repository::Log::Iterator; \& \& # use a default Git::Repository context \& my $iter = Git::Repository::Log::Iterator\->new(\*(AqHEAD~10..\*(Aq); \& \& # or provide an existing instance \& my $iter = Git::Repository::Log::Iterator\->new( $r, \*(AqHEAD~10..\*(Aq ); \& \& # get the next log record \& while ( my $log = $iter\->next ) { \& ...; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Git::Repository::Log::Iterator\*(C'\fR initiates a \fBgit log\fR command from a list of paramaters and parses its output to produce Git::Repository::Log objects represening each log item. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" .Vb 1 \& my $iter = Git::Repository::Log::Iterator\->new( @args ); .Ve .PP Create a new \fBgit log\fR stream from the parameter list in \f(CW@args\fR and return a iterator on it. .PP \&\f(CW\*(C`new()\*(C'\fR will happily accept any parameters, but note that \&\f(CW\*(C`Git::Repository::Log::Iterator\*(C'\fR expects the output to look like that of \f(CW\*(C`\-\-pretty=raw\*(C'\fR, and so will force the the \f(CW\*(C`\-\-pretty\*(C'\fR option (in case \f(CW\*(C`format.pretty\*(C'\fR is defined in the Git configuration). It will also forcibly remove colored output (using \f(CW\*(C`\-\-color=never\*(C'\fR). .PP Extra output (like patches) will be stored in the \f(CW\*(C`extra\*(C'\fR parameter of the Git::Repository::Log object. Decorations will be lost. .PP When unsupported options are recognized in the parameter list, \f(CW\*(C`new()\*(C'\fR will \f(CW\*(C`croak()\*(C'\fR with a message advising to use \f(CW\*(C`run( \*(Aqlog\*(Aq => ... )\*(C'\fR to parse the output yourself. .PP The object is really a blessed hash reference, with only two keys: .IP "cmd" 4 .IX Item "cmd" The Git::Repository::Command object running the actual \fBgit log\fR command. It might not be defined in some cases (see below \*(L"new_from_fh\*(R" and \*(L"new_from_file\*(R"). .IP "fh" 4 .IX Item "fh" The filehandle from which the output of \fBgit log\fR is actually read. This is the only attribute needed to run the \*(L"next\*(R" method. .SS "new_from_fh" .IX Subsection "new_from_fh" This constructor makes it possible to provide the filehandle directly. .PP The \f(CW\*(C`cmd\*(C'\fR key is not defined when using this constructor. .SS "new_from_file" .IX Subsection "new_from_file" This constructor makes it possible to provide a filename that will be \&\f(CW\*(C`open()\*(C'\fRed to produce a filehandle to read the log stream from. .PP The \f(CW\*(C`cmd\*(C'\fR key is not defined when using this constructor. .SS "next" .IX Subsection "next" .Vb 1 \& my $log = $iter\->next; .Ve .PP Return the next log item as a Git::Repository::Log object, or nothing if the stream has ended. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2010\-2016 Philippe Bruhat (BooK), all rights reserved. .SH "LICENSE" .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.