This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Unicos/mk requires elaborate paranoia.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 21 Aug 2000 17:51:29 +0000 (17:51 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 21 Aug 2000 17:51:29 +0000 (17:51 +0000)
p4raw-id: //depot/perl@6750

lib/Math/Complex.pm

index af2b2a0..ece2aad 100644 (file)
@@ -12,10 +12,13 @@ $VERSION = "1.30";
 our($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $Inf);
 
 BEGIN {
-    my $e = $!;
-    $Inf = CORE::exp(CORE::exp(30)); # We do want an arithmetic overflow.
-    $! = $e; # Clear ERANGE.
-    undef $Inf unless $Inf =~ /^inf(?:inity)?$/i; # Inf INF inf Infinity
+    unless ($^O eq 'unicosmk') {
+        my $e = $!;
+       # We do want an arithmetic overflow.
+        eval '$Inf = CORE::exp(CORE::exp(30))';
+        $! = $e; # Clear ERANGE.
+        undef $Inf unless $Inf =~ /^inf(?:inity)?$/i; # Inf INF inf Infinity
+    }
     $Inf = "Inf" if !defined $Inf || !($Inf > 0); # Desperation.
 }