summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-01-29 12:23:31 +0000
committerNicholas Clark <nick@ccl4.org>2012-02-18 13:16:51 +0100
commit60b5c0852d4781fad134c3b77ddcbce486e3bc30 (patch)
treee2d449e9e03089214805a23ec47048e5c98caba3 /lib
parent39376b252267e5dd20227d65acf493c07bb4dd4b (diff)
downloadperl-60b5c0852d4781fad134c3b77ddcbce486e3bc30.tar.gz
Bring the joy of strict and warnings to Functions.t
This reveals that use_ok() was not in a BEGIN block, and in turn that the test count needs to be declared before this BEGIN block runs. Now fixed.
Diffstat (limited to 'lib')
-rw-r--r--lib/Pod/t/Functions.t12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Pod/t/Functions.t b/lib/Pod/t/Functions.t
index ec74b43d05..fb6dc400b5 100644
--- a/lib/Pod/t/Functions.t
+++ b/lib/Pod/t/Functions.t
@@ -1,18 +1,20 @@
-#!perl
+#!perl -w
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
}
+use strict;
+
use File::Basename;
use File::Spec;
-use Test::More;
-plan tests => 9;
-
+use Test::More tests => 9;
-use_ok( 'Pod::Functions' );
+BEGIN {
+ use_ok( 'Pod::Functions' );
+}
# How do you test exported vars?
my( $pkg_ref, $exp_ref ) = ( \%Pod::Functions::Kinds, \%Kinds );