The main problem is the dependency which we we don't want to create in
Apache-Test.
yes, I agree. but I think that something like this would be great, as it would keep users from needing to jump through a bunch of hoops just to prevent redefined warnings.
I understand that your patch proposes to introduce:
use Apache::TestUtil qw(:testmore); use Test::More;
correct?
There are two things:
1. :tesmore imports has nothing to do with Test::More, so that tag is very confusing. How about fixing import() instead and use a special optional first argument:
use Apache::TestUtil '-withtestmore'; use Test::More;
or similar?
2. Apache::TestUtil's ok, skip and plan aren't compatible with Test::More's one, so I'm not sure what do you achieve with this patch.
IMHO, users wanting to only use Apache::TestUtil's certain functions while using Test::More should simply import only those functions. Problem solved.
Index: lib/Apache/Test.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm,v
retrieving revision 1.77
diff -u -r1.77 Test.pm
--- lib/Apache/Test.pm 9 Mar 2004 01:21:32 -0000 1.77
+++ lib/Apache/Test.pm 12 Apr 2004 19:48:06 -0000
@@ -22,7 +22,7 @@
use Config;
use Apache::TestConfig ();
-use vars qw(@ISA @EXPORT $VERSION %SubTests @SkipReasons);
+use vars qw(@ISA @EXPORT %EXPORT_TAGS $VERSION %SubTests @SkipReasons);
@ISA = qw(Exporter);
@EXPORT = qw(ok skip sok plan have have_lwp have_http11
@@ -30,6 +30,12 @@
have_min_apache_version have_apache_version have_perl have_min_perl_version have_min_module_version
have_threads under_construction have_apache_mpm);
+
+# everything but ok(), skip(), and plan() - Test::More provides these
+my @test_more_exports = grep { ! /^(ok|skip|plan)$/ } @EXPORT;
+
+%EXPORT_TAGS = (testmore => [EMAIL PROTECTED]);
+
$VERSION = '1.10';
%SubTests = ();
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com