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"`
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
36 + # notice we are passed a list of filenames NOT as common in unix the
37 + # contents of the file.
45 +foreach $module (sort keys %require) {
46 + if (length($require{$module}) == 0) {
47 + print "perl($module)\n";
49 + print "perl($module) = $require{$module}\n";
51 + # we need to print it without the version number until the
52 + # requires syntax accepts version numbers correctly.
54 +# print "perl($module)\n";
67 + open(FILE, "<$file")||
68 + die("Could not open file: '$file' : $!\n");
70 + my ($package, $version) = ();
74 + # skip the documentation
75 + if ( (m/^=(head1|head2|pod)/) .. (m/^=(cut)/) ) {
79 + # skip the data section
80 + if (m/^__(DATA|END)__$/) {
84 + # not everyone puts the package name of the file as the first
85 + # package name so we report all namespaces as if they were
86 + # provided packages (really ugly).
88 + if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
91 + $require{$package}=undef;
94 + # after we found the package name take the first assignment to
95 + # $VERSION as the version number. Exporter requires that the
96 + # variable be called VERSION so we are safe.
98 + # here are examples of VERSION lines from the perl distribution
100 + #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
101 + #ExtUtils/Install.pm:$VERSION = substr q$Revision$, 10;
102 + #CGI/Apache.pm:$VERSION = (qw$Revision$)[1];
103 + #DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning
107 + (m/^\s*\$VERSION\s+=\s+/)
110 + # first see if the version string contains the string
111 + # '$Revision' this often causes bizzare strings and is the most
112 + # common method of non static numbering.
114 + if (m/(\$Revision: (\d+[.0-9]+))/) {
116 + } elsif (m/[\'\"]?(\d+[.0-9]+)[\'\"]?/) {
118 + # look for a static number hard coded in the script
122 + $require{$package}=$version;