From 465ef26f5213110b0fbef4beb3f601d18dc2cb05 Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Thu, 5 Jun 2014 13:56:57 +0100 Subject: Add optional POD testing --- Changes | 1 + MANIFEST | 1 + Makefile.PL | 11 +++++++++++ t/pod.t | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 t/pod.t 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(); + } +} + +#=============================================================================== -- cgit v1.2.3-24-ge0c7