summaryrefslogtreecommitdiff
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
parentcec5658b4946be49eaa5788c1da322efecd480f8 (diff)
downloadp5-Git-Annex-eb93df91d88ddc271c87ec7c59771994853a51f7.tar.gz
use PodWeaver
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rwxr-xr-xbin/annex-review-unused8
-rwxr-xr-xbin/annex-to-annex8
-rwxr-xr-xbin/annex-to-annex-dropunused8
-rwxr-xr-xbin/annex-to-annex-reinject8
-rw-r--r--debian/control1
-rw-r--r--dist.ini2
-rw-r--r--lib/Git/Annex.pm19
-rw-r--r--lib/Git/Annex/BatchCommand.pm15
8 files changed, 22 insertions, 47 deletions
diff --git a/bin/annex-review-unused b/bin/annex-review-unused
index 3cc2671..1d4ae11 100755
--- a/bin/annex-review-unused
+++ b/bin/annex-review-unused
@@ -1,7 +1,7 @@
#!/usr/bin/perl
+# PODNAME: annex-review-unused
+# ABSTRACT: interactively process `git annex unused` output
-# annex-review-unused -- interactively process `git annex unused` output
-#
# Copyright (C) 2019-2020 Sean Whitton <spwhitton@spwhitton.name>
#
# This program is free software: you can redistribute it and/or modify
@@ -17,10 +17,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
-
-annex-review-unused - interactively process `git annex unused` output
-
=head1 SYNOPSIS
diff --git a/bin/annex-to-annex b/bin/annex-to-annex
index 0ebd771..8d94ba0 100755
--- a/bin/annex-to-annex
+++ b/bin/annex-to-annex
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-
-# annex-to-annex -- use hardlinks to migrate files between git annex repos
+# PODNAME: annex-to-annex
+# ABSTRACT: use hardlinks to migrate files between git annex repos
# Copyright (C) 2019-2020 Sean Whitton
#
@@ -17,10 +17,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
-
-annex-to-annex - use hardlinks to migrate files between git annex repos
-
=head1 SYNOPSIS
diff --git a/bin/annex-to-annex-dropunused b/bin/annex-to-annex-dropunused
index 33ddf03..508b79a 100755
--- a/bin/annex-to-annex-dropunused
+++ b/bin/annex-to-annex-dropunused
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-
-# annex-to-annex-dropunused -- drop old hardlinks migrated by annex-to-annex
+# PODNAME: annex-to-annex-dropunused
+# ABSTRACT: drop old hardlinks migrated by annex-to-annex
# Copyright (C) 2019-2020 Sean Whitton
#
@@ -17,10 +17,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
-
-annex-to-annex-dropunused - drop old hardlinks migrated by annex-to-annex
-
=head1 SYNOPSIS
diff --git a/bin/annex-to-annex-reinject b/bin/annex-to-annex-reinject
index d7bab2b..023ebe3 100755
--- a/bin/annex-to-annex-reinject
+++ b/bin/annex-to-annex-reinject
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-
-# annex-to-annex-reinject -- use 'git annex reinject' to redo annex-to-annex
+# PODNAME: annex-to-annex-reinject
+# ABSTRACT: use 'git annex reinject' to redo annex-to-annex
# Copyright (C) 2019-2020 Sean Whitton
#
@@ -17,10 +17,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
-
-annex-to-annex-reinject - use 'git annex reinject' to redo annex-to-annex
-
=head1 SYNOPSIS
diff --git a/debian/control b/debian/control
index 5ffd414..86de391 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Build-Depends-Indep:
libdigest-md5-file-perl,
libdist-zilla-perl,
libdist-zilla-plugin-git-perl,
+ libdist-zilla-plugin-podweaver-perl,
libfile-chdir-perl,
libfile-chmod-perl,
libfile-slurp-perl,
diff --git a/dist.ini b/dist.ini
index 842c1b5..21debcd 100644
--- a/dist.ini
+++ b/dist.ini
@@ -7,7 +7,7 @@ copyright_year = 2019-2020
version = 0.001
[PkgVersion]
-[PodVersion]
+[PodWeaver]
[MetaJSON]
[NextRelease]
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.