--- ./SuSE/SuSEconfig.perl.orig	Wed Sep 12 18:14:20 2001
+++ ./SuSE/SuSEconfig.perl	Wed Sep 12 18:22:26 2001
@@ -0,0 +1,75 @@
+#! /bin/bash
+#
+# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany.  All rights reserved.
+#
+# Author: Burchard Steinbild <bs@suse.de>, 1996
+#         Martin Scherbaum <maddin@suse.de>, 5/1997         
+#         Ruediger Oertel <ro@suse.de>, 7/1998
+
+#
+# Variables in /etc/rc.config used by this script are: 
+#   CREATE_PERLLOCAL_POD
+#
+# This script calls the scripts:
+#   /usr/sbin/perllocal.suse which comes from the package perl
+#
+
+#
+# check if we are started as root
+# only one of UID and USER must be set correctly
+#
+if test "$UID" != 0 -a "$USER" != root; then
+    echo "You must be root to start $0."
+    exit 1
+fi
+
+#
+# SuSEconfig sometimes sets the variable CHECK_NEWPACKAGE. If it is set
+# to false, we don't have to do anything.
+# 
+test "$CHECK_NEWPACKAGE" = false && exit 0
+
+test -f /etc/rc.config || { echo "No /etc/rc.config found." && exit 1 ; }
+. /etc/rc.config
+
+# this skript only works in a running system.
+
+test -n "$ROOT" && exit 0
+
+test -x `which perl` || { echo "Perl not found." && exit 0 ; }
+
+#
+# see if we may do any work
+#
+test -n "$CREATE_PERLLOCAL_POD" -a "$CREATE_PERLLOCAL_POD" = "yes" \
+	|| { echo "disabled in rc.config" && exit 1 ; }
+	
+#
+# check if anything to add
+#
+PERLLOCAL_PATH=`perl -V:installarchlib`
+
+NEEDED="false"
+
+if test -d /var/adm/perl-modules ; then 
+	if test /var/adm/perl-modules -nt $PERLLOCAL_PATH/perllocal.pod ; then
+		NEEDED="true"
+	elif test ! -f $PERLLOCAL_PATH/perllocal.pod ; then
+		NEEDED="true"
+	fi
+fi
+
+#
+# now call the working script
+#
+if "$NEEDED" = "true" ; then
+	if test -x /var/adm/SuSEconfig/bin/perllocal.SuSE ; then
+		/var/adm/SuSEconfig/bin/perllocal.SuSE
+	else
+		echo "SuSEconfig.perl: /var/adm/SuSEconfig/bin/perllocal.SuSE not found!"
+	fi
+fi
+
+#
+# end of file SuSEconfig.perl
+#
--- ./SuSE/rc.config.perl.orig	Wed Sep 12 18:14:20 2001
+++ ./SuSE/rc.config.perl	Wed Sep 12 18:20:54 2001
@@ -0,0 +1,4 @@
+#
+# May SuSEconfig modify your perllocal.pod? (yes/no)
+#
+CREATE_PERLLOCAL_POD="yes"
--- ./SuSE/perllocal.SuSE.orig	Wed Sep 12 18:14:20 2001
+++ ./SuSE/perllocal.SuSE	Wed Sep 12 18:14:20 2001
@@ -0,0 +1,83 @@
+#!/usr/bin/perl
+# Copyright (c) 1998 S.u.S.E. Gmbh Fuerth, Germany.  All rights reserved.
+#
+# Author: Ruediger Oertel <ro@suse.de>, 1998
+#
+
+use Config;
+
+sub ReadFile {
+  local (*IF,*modules) = @_;
+
+  while(<IF>) {
+	chomp ($_);
+	next if (/^$/);
+	if (/^=head2.*$/) {
+		($front,$rear) = split (': ',$_);
+		$front =~ s/^=head2\s*//; 
+		$modules{$rear} = "$front";
+	} elsif (/^=over [0-9]*$/) {
+		($dummy,$num) = split ('\s',$_);
+		$curnum = 0;
+	} elsif (/^C<.*:.*>$/) {
+		$entry = $_;
+		$curnum++;
+		$modules{$rear} .= "\0$entry";
+	} elsif (/^=back$/) {
+		;
+	} elsif (/^=item \*$/) {
+		;
+	} else {
+		print "SuSEconfig.perl: parsing perllocal:\n";
+		print "ignoring line: $_\n";
+	}
+  }  
+  return %modules;
+}
+
+local (%allmodules);
+
+if (open (IF, "<$Config{'installarchlib'}/perllocal.pod")) {
+	%allmodules = ReadFile(*IF,*allmodules);
+}
+close (IF);
+
+opendir (DIR, "/var/adm/perl-modules");
+while ($dirent = readdir(DIR)) {
+	next if ($dirent =~ /^\./);
+	open (IF , "/var/adm/perl-modules/$dirent");
+	%allmodules = ReadFile(*IF,*allmodules);
+	close (IF);
+}
+closedir (DIR);
+
+
+if (open (OF, ">$Config{'installarchlib'}/perllocal.pod")) {
+  foreach $key (keys(%allmodules)) {
+	$name = $key;
+	$name =~ s/^.*L\<//;
+	$name =~ s/>$//;
+	$name =~ s/::/\//;
+	@entries = split ('\0',$allmodules{$key});
+	$ipath = $entries[1];
+	$ipath =~ s/^.*\:\s//;
+	$ipath =~ s/>$//;
+
+	# test if the module is really there, else skip	
+	if ( -d "$ipath/$Config{'archname'}/auto/$name" ||
+	     -d "$Config{'installarchlib'}/auto/$name" ) {
+	  $num = $#entries;
+	  print OF "=head2 ",shift(@entries),": $key\n\n";
+	  print OF "=over $num\n\n";
+	  while ($_ = shift(@entries)) {
+	    print OF "=item *\n\n";
+	    print OF "$_\n\n";
+	  }
+	  print OF "=back\n\n";
+	}
+  }
+  close (OF);
+} else {
+	print "SuSEconfig.perl: Can't write to file $Config{'installarchlib'}/perllocal.pod !\n\n";
+}
+
