diff options
author | Craig A. Berry <craigberry@mac.com> | 2007-02-21 01:55:37 +0000 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2007-02-21 01:55:37 +0000 |
commit | 5078fe9db36939fd129d04f339bd821e548f20f2 (patch) | |
tree | 3f66c580ab11a159414b311417e89f0ced168aa9 /lib/Test | |
parent | 4f55667c12ebe5fc04eddfc4074d7d78730cc30e (diff) | |
download | perl-5078fe9db36939fd129d04f339bd821e548f20f2.tar.gz |
Fix VMS exit handling broken in Test::Harness 2.64. Also
submitted as http://rt.cpan.org/Public/Bug/Display.html?id=24985
on CPAN RT queue.
p4raw-id: //depot/perl@30373
Diffstat (limited to 'lib/Test')
-rw-r--r-- | lib/Test/Harness/Results.pm | 13 | ||||
-rw-r--r-- | lib/Test/Harness/Straps.pm | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/Test/Harness/Results.pm b/lib/Test/Harness/Results.pm index f972fdd816..f4f4c4eca0 100644 --- a/lib/Test/Harness/Results.pm +++ b/lib/Test/Harness/Results.pm @@ -118,7 +118,18 @@ sub ok { return $self->{ok} || 0; } -sub set_exit { my $self = shift; $self->{exit} = shift } +sub set_exit { + my $self = shift; + if ($^O eq 'VMS') { + eval { + use vmsish q(status); + $self->{exit} = shift; # must be in same scope as pragma + } + } + else { + $self->{exit} = shift; + } +} sub exit { my $self = shift; return $self->{exit} || 0; diff --git a/lib/Test/Harness/Straps.pm b/lib/Test/Harness/Straps.pm index 5a88e142bd..bab7266de7 100644 --- a/lib/Test/Harness/Straps.pm +++ b/lib/Test/Harness/Straps.pm @@ -296,7 +296,7 @@ sub analyze_file { $results->set_wait($?); if ( $? && $self->{_is_vms} ) { - eval q{use vmsish "status"; $results->set_exit($?); }; + $results->set_exit($?); } else { $results->set_exit( _wait2exit($?) ); |