From eb93df91d88ddc271c87ec7c59771994853a51f7 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 5 Feb 2020 20:19:25 -0700 Subject: use PodWeaver Signed-off-by: Sean Whitton --- bin/annex-review-unused | 8 ++------ bin/annex-to-annex | 8 ++------ bin/annex-to-annex-dropunused | 8 ++------ bin/annex-to-annex-reinject | 8 ++------ debian/control | 1 + dist.ini | 2 +- lib/Git/Annex.pm | 19 +++++++------------ lib/Git/Annex/BatchCommand.pm | 15 +++++---------- 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 # # 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 . -=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 . -=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 . -=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 . -=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 . -=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 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 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 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 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 . -=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) 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 method. @@ -108,7 +103,7 @@ Synonym for C method. *ask = \&say; -=head2 restart +=method restart Kill and restart the C<--batch> command. -- cgit v1.2.3