You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by fr...@taperfriendlymusic.org on 2007/08/06 02:27:37 UTC

Apache2::Reload - SameInterp refactoring

Hi all,

I was hacking on getting the Apache2::Reload distro independent today and
have identified a few things that seem like they are coupled to this
release.

TestCommon::SameInterp is used by t/modules/reload.t, but currently
resides in   t/lib/TestCommon.

There's a note in SameInterp which follows:

  META: consider merging those into Apache::TestRequest (or add a new
  module, e.g. Apache::TestRequestSameInterp)

Considering that I need SameInterp to run t/modules/reload.t, I think that
this new module idea is a great one.  Here are some suggested moves to
make this happen by moving it out of the modperl repo and into
Apache::Test.  It's not all working yet on my setup but I wanted to run
this by the group to get some feedback on the general direction here.

A  +   Apache-Test/t/response/TestApache2/sameinterp.pm
A  +   Apache-Test/lib/Apache/TestRequestSameInterp.pm
A      Apache-Test/t/apache2/all.t
A      Apache-Test/t/apache2/sameinterp.t
D      t/modperl/sameinterp.t
D      t/response/TestModperl/sameinterp.pm

Index: t/apr/pool_lifetime.t
===================================================================
--- t/apr/pool_lifetime.t       (revision 560637)
+++ t/apr/pool_lifetime.t       (working copy)
@@ -4,7 +4,7 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
-use TestCommon::SameInterp;
+use Apache::TestRequestSameInterp;

 plan tests => 2, need 'HTML::HeadParser';

Index: t/modules/reload.t
===================================================================
--- t/modules/reload.t  (revision 560637)
+++ t/modules/reload.t  (working copy)
@@ -4,10 +4,9 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
+use Apache::TestRequestSameInterp;
 use File::Spec::Functions qw(catfile);

-use TestCommon::SameInterp;
-
 plan tests => 3, need 'HTML::HeadParser';

 my $test_file = catfile Apache::Test::vars("serverroot"),
Index: t/modperl/cookie2.t
===================================================================
--- t/modperl/cookie2.t (revision 560637)
+++ t/modperl/cookie2.t (working copy)
@@ -14,7 +14,7 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
-use TestCommon::SameInterp;
+use Apache::TestRequestSameInterp;

 plan tests => 3, need 'HTML::HeadParser';

Index: t/modperl/cookie.t
===================================================================
--- t/modperl/cookie.t  (revision 560637)
+++ t/modperl/cookie.t  (working copy)
@@ -19,9 +19,8 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
+use Apache::TestRequestSameInterp;

-use TestCommon::SameInterp;
-
 plan tests => 3, need 'HTML::HeadParser';

 my $module   = 'TestModperl::cookie';

... probably half a dozen other modules which require this change also



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache2::Reload - SameInterp refactoring

Posted by Fred Moyer <fr...@taperfriendlymusic.org>.
Philippe M. Chiasson wrote:
> fred@taperfriendlymusic.org wrote:
>> Considering that I need SameInterp to run t/modules/reload.t, I think that
>> this new module idea is a great one.
> 
> I agree, but not sure about the name ;-?
> 
> Apache::TestRequestPleaseUseTheSameInterpForThisRequest ...
> 
> How about breaking things down a bit more
> 
> Apache::TestRequest::SameInterp
> 
> Or something like that ?

you know, I really like that a lot ( x 10 ) better :)

>> ... probably half a dozen other modules which require this change also
> 
> Feels like a step in the correct direction. I'd go for it.

Thanks for the feedback Gozer.  I'll hack this out until tests are 
passing for me under both mp1 and mp2 and then submit a full diff for 
commit approval.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache2::Reload - SameInterp refactoring

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
fred@taperfriendlymusic.org wrote:
> Hi all,
> 
> I was hacking on getting the Apache2::Reload distro independent today and
> have identified a few things that seem like they are coupled to this
> release.
> 
> TestCommon::SameInterp is used by t/modules/reload.t, but currently
> resides in   t/lib/TestCommon.
> 
> There's a note in SameInterp which follows:
> 
>   META: consider merging those into Apache::TestRequest (or add a new
>   module, e.g. Apache::TestRequestSameInterp)
> 
> Considering that I need SameInterp to run t/modules/reload.t, I think that
> this new module idea is a great one.

I agree, but not sure about the name ;-?

Apache::TestRequestPleaseUseTheSameInterpForThisRequest ...

How about breaking things down a bit more

Apache::TestRequest::SameInterp

Or something like that ?

>  Here are some suggested moves to
> make this happen by moving it out of the modperl repo and into
> Apache::Test.

A good idea IMO.

>  It's not all working yet on my setup but I wanted to run
> this by the group to get some feedback on the general direction here.
> 
> A  +   Apache-Test/t/response/TestApache2/sameinterp.pm
> A  +   Apache-Test/lib/Apache/TestRequestSameInterp.pm
> A      Apache-Test/t/apache2/all.t
> A      Apache-Test/t/apache2/sameinterp.t
> D      t/modperl/sameinterp.t
> D      t/response/TestModperl/sameinterp.pm
> 
> [...]
> 
> ... probably half a dozen other modules which require this change also

Feels like a step in the correct direction. I'd go for it.

------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/