about summary refs log tree commit
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2014-06-05 13:56:57 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2014-06-05 13:56:57 +0100
commit465ef26f5213110b0fbef4beb3f601d18dc2cb05 (patch)
treee11cf102132813634cdcd43bd36bdc9f19cb5530
parentf5810d8b38aa5e494c3f7f1b976018eff278b35b (diff)
downloadperl-libnet-465ef26f5213110b0fbef4beb3f601d18dc2cb05.tar.gz
Add optional POD testing
-rw-r--r--Changes1
-rw-r--r--MANIFEST1
-rw-r--r--Makefile.PL11
-rw-r--r--t/pod.t47
4 files changed, 60 insertions, 0 deletions
diff --git a/Changes b/Changes
index 83e1e2c..0767d0f 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
 libnet 1.28  -- TODO
 
+  * Add optional POD testing.
   * Make code Perl::Critic clean.
   * Move Net/*.pm into lib/Net/ sub-directory within distribution. This is the
     usual layout style these days.
diff --git a/MANIFEST b/MANIFEST
index 936cfc9..a9ddcc0 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -34,6 +34,7 @@ t/hostname.t
 t/libnet_t.pl
 t/netrc.t
 t/nntp.t
+t/pod.t
 t/require.t
 t/smtp.t
 t/smtp_ssl.t
diff --git a/Makefile.PL b/Makefile.PL
index fe35c56..a110530 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -115,6 +115,17 @@ MAIN: {
                             }
                         }
                     }
+                },
+
+                podtest => {
+                    description => 'POD testing',
+                    prereqs => {
+                        test => {
+                            requires => {
+                                'Test::Pod' => '1.00'
+                            }
+                        }
+                    }
                 }
             }
         },
diff --git a/t/pod.t b/t/pod.t
new file mode 100644
index 0000000..5af23ae
--- /dev/null
+++ b/t/pod.t
@@ -0,0 +1,47 @@
+#!perl
+#===============================================================================
+#
+# t/pod.t
+#
+# DESCRIPTION
+#   Test script to check POD.
+#
+# COPYRIGHT
+#   Copyright (C) 2014 Steve Hay.  All rights reserved.
+#
+# LICENCE
+#   You may distribute under the terms of either the GNU General Public License
+#   or the Artistic License, as specified in the LICENCE file.
+#
+#===============================================================================
+
+use 5.008001;
+
+use strict;
+use warnings;
+
+use Test::More;
+
+#===============================================================================
+# MAIN PROGRAM
+#===============================================================================
+
+MAIN: {
+    my $ok = eval {
+        require Test::Pod;
+        Test::Pod->import();
+        1;
+    };
+
+    if (not $ok) {
+        plan skip_all => 'Test::Pod required to test POD';
+    }
+    elsif ($Test::Pod::VERSION < 1.00) {
+        plan skip_all => 'Test::Pod 1.00 or higher required to test POD';
+    }
+    else {
+        all_pod_files_ok();
+    }
+}
+
+#===============================================================================