1 --- perl5.005_03/find-perl-provides Thu Jan 1 01:00:00 1970
2 +++ perl5.005_03.new/find-perl-provides Fri Oct 22 17:43:47 1999
7 +export LD_LIBRARY_PATH="FPPATH"
9 +filelist=`sed "s/['\"]/\\\&/g"|egrep -v "\.(ph|pod|gz)$"`
11 +echo $filelist|/usr/lib/rpm/find-provides
12 +FPPATH/find-perl.prov $filelist
14 --- perl5.005_03/find-perl.prov Thu Jan 1 01:00:00 1970
15 +++ perl5.005_03.new/find-perl.prov Fri Oct 22 17:44:18 1999
19 +# a simple script to print the proper name for perl libraries.
21 +# I plan to rewrite this in C so that perl is not required by RPM at
24 +# by Ken Estes Mail.com kestes@staff.mail.com
26 +# it would be much better if perl could tell us the proper name of a
32 + if (! m=\.(so|gz|ph|pod)$=) {
38 + # notice we are passed a list of filenames NOT as common in unix the
39 + # contents of the file.
42 + if (! m=\.(so|gz|ph|pod)$=) {
49 +foreach $module (sort keys %require) {
50 + if (length($require{$module}) == 0) {
51 + print "perl($module)\n";
53 + print "perl($module) = $require{$module}\n";
55 + # we need to print it without the version number until the
56 + # requires syntax accepts version numbers correctly.
58 +# print "perl($module)\n";
71 + open(FILE, "<$file")||
72 + die("Could not open file: '$file' : $!\n");
74 + my ($package, $version) = ();
78 + # skip the documentation
79 + if ( (m/^=(head1|head2|pod)/) .. (m/^=(cut)/) ) {
83 + # skip the data section
84 + if (m/^__(DATA|END)__$/) {
88 + # not everyone puts the package name of the file as the first
89 + # package name so we report all namespaces as if they were
90 + # provided packages (really ugly).
92 + if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
95 + $require{$package}=undef;
98 + # after we found the package name take the first assignment to
99 + # $VERSION as the version number. Exporter requires that the
100 + # variable be called VERSION so we are safe.
102 + # here are examples of VERSION lines from the perl distribution
104 + #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
105 + #ExtUtils/Install.pm:$VERSION = substr q$Revision$, 10;
106 + #CGI/Apache.pm:$VERSION = (qw$Revision$)[1];
107 + #DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning
111 + (m/^\s*\$VERSION\s+=\s+/)
114 + # first see if the version string contains the string
115 + # '$Revision' this often causes bizzare strings and is the most
116 + # common method of non static numbering.
118 + if (m/(\$Revision: (\d+[.0-9]+))/) {
120 + } elsif (m/[\'\"]?(\d+[.0-9]+)[\'\"]?/) {
122 + # look for a static number hard coded in the script
126 + $require{$package}=$version;