James Keenan via RT a écrit :
On Mon Jun 09 05:00:17 2008, [EMAIL PROTECTED] wrote:
Determining whether perldoc is installed...
step auto::perldoc died during execution: The fchmod function is
unimplemented at config/auto/perldoc.pm line 42.
On Windows, the Perl function 'chmod' works with filename (use POSIX
chmod) but not the file handle (use POSIX fchmod).
François.
François: What happens if you take the 'chmod' out completely? Does
the test complete?
The attached patch solves it on Windows.
François.
(We use File::Temp extensively in the testing, but I can't recall a
situation where I absolutely had to 'chmod' a tempfile. This may just
be an artifact of the previous way of doing things.)
Thank you very much.
kid51
Index: config/auto/perldoc.pm
===================================================================
--- config/auto/perldoc.pm (revision 28197)
+++ config/auto/perldoc.pm (working copy)
@@ -38,8 +38,10 @@
my $cmd = $conf->data->get_p5('scriptdirexp') . q{/perldoc};
my $tmpfile = File::Temp->new( UNLINK => 1, SUFFIX => '.tmp' );
- my $mode = 0666;
- chmod $mode, $tmpfile;
+ unless ($^O =~ /Win32/) {
+ my $mode = 0666;
+ chmod $mode, $tmpfile;
+ }
my $content = capture_output("$cmd -ud $tmpfile perldoc") || undef;
return 1 unless defined( $self->_initial_content_check($conf, $content) );