summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@cpan.org>2021-09-06 12:30:00 -0700
committerRuss Allbery <rra@cpan.org>2021-09-06 12:30:00 -0700
commitcdcd3dbdb76f0771fc4c5dba3190cfb4fb66495b (patch)
treee4c10b45176ad1f25afa78c63e6e40513f310282
parentad51f1d730ed607a7a738f66b9e3d398df48d1a7 (diff)
Add App::DocKnot::Spin dependencies
Mention the App::DocKnot::Spin dependencies in Build.PL and the overall documentation. Make the Git::Repository dependency unconditional rather than working around its absence.
-rw-r--r--Build.PL3
-rw-r--r--README3
-rw-r--r--README.md3
-rw-r--r--docs/docknot.yaml3
-rwxr-xr-xlib/App/DocKnot/Spin.pm6
-rw-r--r--t/data/generate/docknot/output/thread3
6 files changed, 17 insertions, 4 deletions
diff --git a/Build.PL b/Build.PL
index 6b6166a..7286117 100644
--- a/Build.PL
+++ b/Build.PL
@@ -63,6 +63,8 @@ my $build = Module::Build->new(
requires => {
'File::BaseDir' => 0,
'File::ShareDir' => 0,
+ 'Git::Repository' => 0,
+ 'Image::Size' => 0,
'IO::Uncompress::Gunzip' => 0,
'IO::Compress::Xz' => 0,
'IPC::Run' => 0,
@@ -73,6 +75,7 @@ my $build = Module::Build->new(
'Perl6::Slurp' => 0,
'Pod::Usage' => 0,
'Template' => 0,
+ 'Text::Balanced' => 0,
'YAML::XS' => '0.81',
perl => '5.024',
},
diff --git a/README b/README
index 73c2375..394b772 100644
--- a/README
+++ b/README
@@ -59,6 +59,8 @@ REQUIREMENTS
* File::BaseDir
* File::ShareDir
+ * Git::Repository
+ * Image::Size
* IO::Compress::Xz (part of IO-Compress-Lzma)
* IO::Uncompress::Gunzip (part of IO-Compress)
* IPC::Run
@@ -68,6 +70,7 @@ REQUIREMENTS
* List::SomeUtils
* Perl6::Slurp
* Template (part of Template Toolkit)
+ * Text::Balanced
* YAML::XS
BUILDING AND INSTALLATION
diff --git a/README.md b/README.md
index 8b4b4fd..95cafa2 100644
--- a/README.md
+++ b/README.md
@@ -65,6 +65,8 @@ The following additional Perl modules are required to use it:
* File::BaseDir
* File::ShareDir
+* Git::Repository
+* Image::Size
* IO::Compress::Xz (part of IO-Compress-Lzma)
* IO::Uncompress::Gunzip (part of IO-Compress)
* IPC::Run
@@ -74,6 +76,7 @@ The following additional Perl modules are required to use it:
* List::SomeUtils
* Perl6::Slurp
* Template (part of Template Toolkit)
+* Text::Balanced
* YAML::XS
## Building and Installation
diff --git a/docs/docknot.yaml b/docs/docknot.yaml
index aef5127..05427d6 100644
--- a/docs/docknot.yaml
+++ b/docs/docknot.yaml
@@ -115,6 +115,8 @@ requirements: |
* File::BaseDir
* File::ShareDir
+ * Git::Repository
+ * Image::Size
* IO::Compress::Xz (part of IO-Compress-Lzma)
* IO::Uncompress::Gunzip (part of IO-Compress)
* IPC::Run
@@ -124,6 +126,7 @@ requirements: |
* List::SomeUtils
* Perl6::Slurp
* Template (part of Template Toolkit)
+ * Text::Balanced
* YAML::XS
test:
diff --git a/lib/App/DocKnot/Spin.pm b/lib/App/DocKnot/Spin.pm
index c9f294f..c534a38 100755
--- a/lib/App/DocKnot/Spin.pm
+++ b/lib/App/DocKnot/Spin.pm
@@ -33,6 +33,7 @@ use vars qw(%DEPEND $DOCID @EXCLUDES $FILE @FILES $FULLPATH $ID $OUTPUT
use Cwd qw(getcwd);
use FileHandle ();
use Getopt::Long qw(GetOptions);
+use Git::Repository ();
use Image::Size qw(html_imgsize);
use File::Copy qw(copy);
use File::Find qw(find finddepth);
@@ -1491,10 +1492,7 @@ sub spin_command {
$self->read_sitemap("$SOURCE/.sitemap");
$self->read_versions("$SOURCE/.versions");
if (-d "$SOURCE/.git") {
- eval {
- require Git::Repository;
- $REPO = Git::Repository->new (work_tree => $SOURCE);
- };
+ $REPO = Git::Repository->new(work_tree => $SOURCE);
}
$File::Find::dont_use_nlink = 1;
if (-f "$SOURCE/.rss") {
diff --git a/t/data/generate/docknot/output/thread b/t/data/generate/docknot/output/thread
index 80c16fd..9ac3647 100644
--- a/t/data/generate/docknot/output/thread
+++ b/t/data/generate/docknot/output/thread
@@ -106,6 +106,8 @@ The following additional Perl modules are required to use it:
\bullet(packed)[File::BaseDir]
\bullet(packed)[File::ShareDir]
+\bullet(packed)[Git::Repository]
+\bullet(packed)[Image::Size]
\bullet(packed)[IO::Compress::Xz (part of IO-Compress-Lzma)]
\bullet(packed)[IO::Uncompress::Gunzip (part of IO-Compress)]
\bullet(packed)[IPC::Run]
@@ -115,6 +117,7 @@ The following additional Perl modules are required to use it:
\bullet(packed)[List::SomeUtils]
\bullet(packed)[Perl6::Slurp]
\bullet(packed)[Template (part of Template Toolkit)]
+\bullet(packed)[Text::Balanced]
\bullet(packed)[YAML::XS]
\h2[Download]