From 60b5c0852d4781fad134c3b77ddcbce486e3bc30 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 29 Jan 2012 12:23:31 +0000 Subject: 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. --- lib/Pod/t/Functions.t | 12 +++++++----- 1 file 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 ); -- cgit v1.2.1