You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2004/04/08 18:35:54 UTC

win32 finfo->fname

hi all

can somebody on win32 verify this patch for me?  IIRC the required fix was
committed in november, and 2.0.49 is the latest release that contains the
fix, so all should be ok now.

thanks

--Geoff

Re: win32 finfo->fname

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>>At the moment the only idea I have is to have 2 different sets of APIs
>>which underneath will call the same core functions. e.g.:
>>
>>skip_have_...
>>have_...
>>
>>the only difference is that skip will also push the reason, and non-skip
>>won't. But may be there are better ideas.
> 
> 
> I don't think that is necessary.  plan() resets @SkipReasons at the end, so
> the only place it would come into play is if you call have_* methods before
> plan().  

Which is exactly what your patch is trying to do. In which case plan() may 
confusingly report 2.0.49 as a missing requirement, even though it is not. You 
needed that check only for a sub-test. A user will then try to satisfy the 
requirement which it is not.

Moreover, some may use this function without calling plan at all, in which 
case it may affect a totally different test, since @SkipReasons is a global.

> calls made after, such as skip(have_cgi, ...) would not interfere.
>  and I never like the 'use constant' bit anyway ;)

What bit are you talking about? This one?

use constant APACHE_2_0_49 => have_apache_version('2.0.49');

It doesn't make any difference, if you move that call until after plan(), you 
will affect the next test if it skips, reporting an extra requirement which is 
not correct.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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


Re: win32 finfo->fname

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> At the moment the only idea I have is to have 2 different sets of APIs
> which underneath will call the same core functions. e.g.:
> 
> skip_have_...
> have_...
> 
> the only difference is that skip will also push the reason, and non-skip
> won't. But may be there are better ideas.

I don't think that is necessary.  plan() resets @SkipReasons at the end, so
the only place it would come into play is if you call have_* methods before
plan().  calls made after, such as skip(have_cgi, ...) would not interfere.
 and I never like the 'use constant' bit anyway ;)

--Geoff

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


Re: win32 finfo->fname

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>>>+use constant APACHE_2_0_49 => have_apache_version('2.0.49');
>>
>>
>>I think we need a separate API for this kind of things. The problem with
>>using
>>have_apache_version is that if you don't have it, it'll push the reason
>>into @skip list and if the test gets skipped it'll print that reason,
>>even though you didn't mean it to. So it happens to work as long as we
>>don't skip the test, but otherwise could produce confusing output. I
>>know we are using it in a few other places as well.
> 
> 
> well we need to make the call at some point - that's what the Apache::Test
> APIs are there for and I wouldn't want to write or support another set just
> because of the @SkipReason foo.

It's not "just because of the @SkipReason foo". That API was written 
explicitly for plan()/skip() API and was not designed for other uses. It 
didn't happen the other way around (i.e. SkipReason wasn't added later).

> do you have some suggestions?

At the moment the only idea I have is to have 2 different sets of APIs which 
underneath will call the same core functions. e.g.:

skip_have_...
have_...

the only difference is that skip will also push the reason, and non-skip 
won't. But may be there are better ideas.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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


Re: win32 finfo->fname

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>> +use constant APACHE_2_0_49 => have_apache_version('2.0.49');
> 
> 
> I think we need a separate API for this kind of things. The problem with
> using
> have_apache_version is that if you don't have it, it'll push the reason
> into @skip list and if the test gets skipped it'll print that reason,
> even though you didn't mean it to. So it happens to work as long as we
> don't skip the test, but otherwise could produce confusing output. I
> know we are using it in a few other places as well.

well we need to make the call at some point - that's what the Apache::Test
APIs are there for and I wouldn't want to write or support another set just
because of the @SkipReason foo.

do you have some suggestions?

--Geoff

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


Re: win32 finfo->fname

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
> hi all
> 
> can somebody on win32 verify this patch for me?  IIRC the required fix was
> committed in november, and 2.0.49 is the latest release that contains the
> fix, so all should be ok now.
> 
> thanks
> 
> --Geoff
> 
> 
> ------------------------------------------------------------------------
> 
> Index: t/response/TestAPR/finfo.pm
> ===================================================================
> RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/finfo.pm,v
> retrieving revision 1.8
> diff -u -r1.8 finfo.pm
> --- t/response/TestAPR/finfo.pm	14 Jan 2004 21:27:41 -0000	1.8
> +++ t/response/TestAPR/finfo.pm	8 Apr 2004 16:30:50 -0000
> @@ -9,6 +9,8 @@
>  use Apache::TestConfig;
>  use constant WIN32 => Apache::TestConfig::WIN32;
>  
> +use constant APACHE_2_0_49 => have_apache_version('2.0.49');

I think we need a separate API for this kind of things. The problem with using
have_apache_version is that if you don't have it, it'll push the reason into 
@skip list and if the test gets skipped it'll print that reason, even though 
you didn't mean it to. So it happens to work as long as we don't skip the 
test, but otherwise could produce confusing output. I know we are using it in 
a few other places as well.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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


Re: win32 finfo->fname

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> Hi Geoff,
>    Sorry for the delay - it's been a crazy two weeks ...

that's fine.  it's good to have you back :)

> Anyway, you're right that this is fine now with 2.0.49 -
> thanks.

cool, thanks.  I'll apply the patch as given, then we can all argue over how
exactly to use have_min_apache_version()  ;)

--Goeff

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


Re: win32 finfo->fname

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 8 Apr 2004, Geoffrey Young wrote:

> hi all
>
> can somebody on win32 verify this patch for me?  IIRC the
> required fix was committed in november, and 2.0.49 is the
> latest release that contains the fix, so all should be ok
> now.
>
> thanks
>
> --Geoff

Hi Geoff,
   Sorry for the delay - it's been a crazy two weeks ...
Anyway, you're right that this is fine now with 2.0.49 -
thanks.

-- 
best regards,
randy

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