summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-05 20:19:25 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-05 20:19:25 -0700
commiteb93df91d88ddc271c87ec7c59771994853a51f7 (patch)
treef415a8e15a26c2285a8b1e86def935bdd6f3995a /lib
parentcec5658b4946be49eaa5788c1da322efecd480f8 (diff)
downloadp5-Git-Annex-eb93df91d88ddc271c87ec7c59771994853a51f7.tar.gz
use PodWeaver
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'lib')
-rw-r--r--lib/Git/Annex.pm19
-rw-r--r--lib/Git/Annex/BatchCommand.pm15
2 files changed, 12 insertions, 22 deletions
diff --git a/lib/Git/Annex.pm b/lib/Git/Annex.pm
index 0877697..5e6fe31 100644
--- a/lib/Git/Annex.pm
+++ b/lib/Git/Annex.pm
@@ -16,10 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-=head1 NAME
-
-Git::Annex - Perl interface to git-annex repositories
-
=head1 SYNOPSIS
my $annex = Git::Annex->new("/home/spwhitton/annex");
@@ -53,6 +49,7 @@ git-annex.
=cut
package Git::Annex;
+# ABSTRACT: Perl interface to git-annex repositories
use 5.028;
use strict;
@@ -74,9 +71,7 @@ use IPC::System::Simple qw(capturex);
use Moo;
use namespace::clean;
-=head1 METHODS
-
-=head2 toplevel
+=attr toplevel
Returns the toplevel of the repository.
@@ -84,7 +79,7 @@ Returns the toplevel of the repository.
has toplevel => (is => 'ro');
-=head2 git
+=attr git
Returns an instance of L<Git::Wrapper> initialised in the repository.
@@ -94,7 +89,7 @@ has git => (
is => 'lazy',
default => sub { Git::Wrapper->new(shift->toplevel) });
-=head2 repo
+=attr repo
Returns an instance of L<Git::Repository> initialised in the repository.
@@ -107,7 +102,7 @@ has repo => (
# Git::Repository::new, so we chdir and let call without arguments
default => sub { local $CWD = shift->toplevel; Git::Repository->new });
-=head2 unused(%opts)
+=method unused(%opts)
Runs C<git annex unused> and returns a hashref containing information
on unused files.
@@ -252,7 +247,7 @@ sub _clear_unused_cache {
unlink $self->_unused_cache;
}
-=head2 abs_contentlocation($key)
+=method abs_contentlocation($key)
Returns an absolute path to the content for git-annex key C<$key>.
@@ -265,7 +260,7 @@ sub abs_contentlocation {
$contentlocation ? rel2abs($contentlocation, $self->toplevel) : undef;
}
-=head2 batch($cmd, @args)
+=method batch($cmd, @args)
Instantiate a C<Git::Annex::BatchCommand> object by starting up a
git-annex C<--batch> command.
diff --git a/lib/Git/Annex/BatchCommand.pm b/lib/Git/Annex/BatchCommand.pm
index 3299936..249b53d 100644
--- a/lib/Git/Annex/BatchCommand.pm
+++ b/lib/Git/Annex/BatchCommand.pm
@@ -16,10 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-=head1 NAME
-
-Git::Annex::BatchCommand - Perl interface to git-annex --batch commands
-
=head1 SYNOPSIS
# you should not instantiate this class yourself; use Git::Annex::batch
@@ -43,6 +39,7 @@ processes to perform queries or request changes.
=cut
package Git::Annex::BatchCommand;
+# ABSTRACT: Perl interface to git-annex --batch commands
use 5.028;
use strict;
@@ -52,9 +49,7 @@ use autodie;
use Carp;
use IPC::Open2;
-=head1 METHODS
-
-=head1 new($annex, $cmd, @args)
+=method new($annex, $cmd, @args)
Initialise a batch process in Git::Annex C<$annex>, running git-annex
subcommand C<$cmd> (e.g. C<setpresentkey>) with arguments C<@args>.
@@ -77,7 +72,7 @@ sub new {
return $self;
}
-=head2 say($input, ...)
+=method say($input, ...)
Say a line or lines of input to the batch command's standard input.
Trailing line breaks in C<$input> are optional.
@@ -100,7 +95,7 @@ sub say {
return wantarray ? @output : $output[$#output];
}
-=head2 ask($input, ...)
+=method ask($input, ...)
Synonym for C<say> method.
@@ -108,7 +103,7 @@ Synonym for C<say> method.
*ask = \&say;
-=head2 restart
+=method restart
Kill and restart the C<--batch> command.