develooper Front page | perl.perl5.porters | Postings from February 2011

Re: Smoke [5.13.9] v5.13.9-293-g0cd14f2 FAIL(F) openvms V8.3-1H1(IA64/2 cpu)

From:
Craig A. Berry
Date:
February 9, 2011 05:28
Subject:
Re: Smoke [5.13.9] v5.13.9-293-g0cd14f2 FAIL(F) openvms V8.3-1H1(IA64/2 cpu)
Message ID:
E58DFD17-627F-4F6B-815D-FC13536983D9@mac.com

On Feb 9, 2011, at 4:34 AM, Nicholas Clark wrote:

> On Wed, Feb 09, 2011 at 04:07:37AM -0600, Craig A. Berry wrote:
>
>>    lib/ 
>> vmsish.....................................................FAILED  
>> at test 21

FWIW, this is what the failure looks like:

ok 20 - compile ERR exit, vmsish hushed, DCL error message check
Array found where operator expected at (eval 16) line 2, near  
"qw(time) "
not ok 21 - use vmsish qw(time);
#   Failed test 'use vmsish qw(time);'
#   at [.lib]vmsish.t line 129.
#     Tried to use 'vmsish qw(time)'.
#     Error:  syntax error at (eval 16) line 2, near "qw(time) @"
ok 22 - (time) UTC: 1297255865 VMS: 1297234265

>
> Does this fix it?
>
> diff --git a/lib/vmsish.t b/lib/vmsish.t
> index fbdca93..41214bb 100644
> --- a/lib/vmsish.t
> +++ b/lib/vmsish.t
> @@ -126,10 +126,7 @@ is($?,0,"outer lex scope of vmsish [POSIX  
> status]");
>   END { 1 while unlink $file; }
>
>   {
> -     use_ok('vmsish qw(time)');
> -
> -     # but that didn't get it in our current scope
> -     use vmsish qw(time);
> +     BEGIN {use_ok('vmsish', 'time') if $^O eq 'VMS'};
>
>      $vmstime   = time;
>      @vmslocal  = localtime($vmstime);
>

That removes too much.  You still have to get the pragma to be in  
effect for the scope the subsequent tests are running in, and use_ok()  
only imports it into the scope of the eval.  And the BEGIN block seems  
unnecessary.  This fixes it:

$ gdiff -pu lib/vmsish.t;-0 lib/vmsish.t
--- lib/vmsish.t;-0     2011-02-09 06:53:07 -0600
+++ lib/vmsish.t        2011-02-09 07:26:22 -0600
@@ -126,7 +126,7 @@ is($?,0,"outer lex scope of vmsish [POSI
    END { 1 while unlink $file; }

    {
-     use_ok('vmsish qw(time)');
+     use_ok('vmsish', 'time');

       # but that didn't get it in our current scope
       use vmsish qw(time);
[end]

I'm off to $work so won't be pushing this in the next 8-10 hours; feel  
free to beat me to it.

________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
  difficult than getting in."
                  Brad Leithauser




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About