# New Ticket Created by  James deBoer 
# Please include the string:  [perl #32280]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=32280 >


Some systems, notable Debian, ship perldoc and perl as seperate
packages. The presence of Perl does not imply the presence of perldoc.

This patch will test to see if perldoc actually works, aborting the
configuration if it does not.

I was considering making the build system not build the documentation if perldoc
did not exist. However, I felt that (a) a perldoc-less Perl is a broken
Perl, and (b) currently, parrot should ship with a lot of documentation. If
somebody feels otherwise, I would be happy to revise the patch.

- James
diff -uNr config_o2/auto/perldoc.pl config/auto/perldoc.pl
--- config_o2/auto/perldoc.pl   1970-01-01 00:00:00.000000000 +0000
+++ config/auto/perldoc.pl      2004-11-01 22:27:54.000000000 +0000
@@ -0,0 +1,31 @@
+#! perl -w
+# Copyright: 2004 James deBoer.  All Rights Reserved.
+
+=head1 NAME
+
+config/auto/perldoc - Perldoc
+
+=head1 DESCRIPTION
+
+Determines if Perldoc exists on the system.
+
+=cut
+
+package Configure::Step;
+
+use strict;
+use vars qw($description @args);
+use Parrot::Configure::Step ':auto';
+
+$description="Determining if your system has perldoc installed...";
+
[EMAIL PROTECTED](verbose);
+
+sub runstep {
+    my $a = `perldoc perldoc`;
+    unless ($a =~ m/perldoc/) {
+       die "Configure.pl: Could not find the perldoc package, which is required.\n";
+    }
+}
+
+1;
Index: lib/Parrot/Configure/RunSteps.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/Configure/RunSteps.pm,v
retrieving revision 1.44
diff -u -r1.44 RunSteps.pm
--- lib/Parrot/Configure/RunSteps.pm    28 Sep 2004 08:51:47 -0000      1.44
+++ lib/Parrot/Configure/RunSteps.pm    1 Nov 2004 22:44:50 -0000
@@ -56,6 +56,7 @@
     auto/aio.pl
     auto/gmp.pl
     auto/snprintf.pl
+    auto/perldoc.pl
     gen/icu.pl
     gen/config_h.pl
     gen/core_pmcs.pl

Reply via email to