At 09:53 PM 11/7/2001 +0100, Tels wrote:

>So, if I read Tim correctly, make that my $foo = $! + 0; and it might
>pass the test.  Needs probably a bit more munging to print the $! in
>numeric context as well as $foo after a failure.

Thanks Tels and Tim.  With the following additional change:

--- ext/POSIX/t/posix.t;-1      Tue Nov  6 13:33:28 2001
+++ ext/POSIX/t/posix.t Wed Nov  7 15:05:30 2001
@@ -166,10 +166,10 @@
        # Autoloading requires many system calls.
        # errno() looks at $! to generate its result.
        # Autoloading should not munge the value.
-       my $foo  = $!;
+       my $foo  = 0 + $!;  # force numeric
        my $errno = POSIX::errno();
        print "not " unless $errno == $foo;
-       print "ok ", 28 + $test, " # POSIX::errno(): $errno, \$!: $!\n";
+       print "ok ", 28 + $test, " # POSIX::errno(): $errno, \$!: $foo\n";
     }
 }
 
[end]

I get 

not ok 28 # POSIX::errno(): 20, $!: 0

which I think means autoloading sets errno but isn't supposed to.  I suspect 
it's doing a -d somewhere and leaving an errno of ENOTDIR laying about.  Hmm. 

Reply via email to