.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 >0, 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::Annex::BatchCommand 3pm" .TH Git::Annex::BatchCommand 3pm "2020-03-27" "perl v5.28.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::Annex::BatchCommand \- Perl interface to git\-annex \-\-batch commands .SH "VERSION" .IX Header "VERSION" version 0.006 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& # you should not instantiate this class yourself; use Git::Annex::batch \& my $annex = Git::Annex\->new("/home/spwhitton/annex"); \& my $batch = $annex\->batch("find", "\-\-not", "\-\-in=here"); \& \& # see git\-annex\-find(1) \-\- \`git annex find \-\-batch \-\-not \-\-in here\` \& # prints an empty string for each file which is not present \& say "foo/bar is not present in this repo" unless $batch\->ask("foo/bar"); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class can be used to run git-annex commands which take the \&\f(CW\*(C`\-\-batch\*(C'\fR option. You can feed the command lines of input and you will get back git-annex's responses. .PP The main point of using \f(CW\*(C`\-\-batch\*(C'\fR commands from Perl is to keep git-annex running rather than repeatedly executing new git-annex processes to perform queries or request changes. .SH "METHODS" .IX Header "METHODS" .ie n .SS "new($annex, $cmd, @args)" .el .SS "new($annex, \f(CW$cmd\fP, \f(CW@args\fP)" .IX Subsection "new($annex, $cmd, @args)" Initialise a batch process in Git::Annex \f(CW$annex\fR, running git-annex subcommand \f(CW$cmd\fR (e.g. \f(CW\*(C`setpresentkey\*(C'\fR) with arguments \f(CW@args\fR. .PP You should use Git::Annex::batch in preference to this method. .SS "say($input, ...)" .IX Subsection "say($input, ...)" Say a line or lines of input to the batch command's standard input. Trailing line breaks in \f(CW$input\fR are optional. .PP In list context, returns a list of git-annex's responses to the items of input, chomped. In scalar context, returns the last of git-annex's responses, chomped. .SS "ask($input, ...)" .IX Subsection "ask($input, ...)" Synonym for \f(CW\*(C`say\*(C'\fR method. .SS "restart" .IX Subsection "restart" Kill and restart the \f(CW\*(C`\-\-batch\*(C'\fR command. .PP This is sometimes needed to ensure the \f(CW\*(C`\-\-batch\*(C'\fR command picks up changes made to the git-annex branch. .SH "AUTHOR" .IX Header "AUTHOR" Sean Whitton .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2019\-2020 by Sean Whitton . .PP This is free software, licensed under: .PP .Vb 1 \& The GNU General Public License, Version 3, June 2007 .Ve