28 Feb 2021 20:21:04 UTC
- Distribution: Git-Annex
- Module version: 0.007
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Testers (50 / 0 / 35)
- KwaliteeBus factor: 1
- % Coverage
- License: gpl_3
- Perl: v5.28.0
- Activity24 month
- Download (33.55KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionSPWHITTON Sean Whitton
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- COPYRIGHT AND LICENSE
Git::Annex::BatchCommand - Perl interface to git-annex --batch commands
# 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");
This class can be used to run git-annex commands which take the
--batchoption. You can feed the command lines of input and you will get back git-annex's responses.
The main point of using
--batchcommands from Perl is to keep git-annex running rather than repeatedly executing new git-annex processes to perform queries or request changes.
Initialise a batch process in Git::Annex
$annex, running git-annex subcommand
setpresentkey) with arguments
You should use Git::Annex::batch in preference to this method.
Say a line or lines of input to the batch command's standard input. Trailing line breaks in
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.
Kill and restart the
This is sometimes needed to ensure the
--batchcommand picks up changes made to the git-annex branch.
Sean Whitton <firstname.lastname@example.org>
This software is Copyright (c) 2019-2021 by Sean Whitton <email@example.com>.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007