Subject: | [PATCH] filename nit in parse_partspec |
When parse_partspec fails to locate a data_provides section in the file it is processing and
falls back to using the filename with the directory portion removed, it runs into trouble on
VMS and ends up spewing the following warnings:
MCR [---]miniperl.exe "-I[---.lib]" "-I[---.lib]" "-I[---.lib]" "-I[---.lib]" PPPort_xs.PL
RealPPPort.xs
Use of uninitialized value $data{"provides"} in pattern match (m//) at parts/ppptools.pl line
115.
Use of uninitialized value $data{"provides"} in pattern match (m//) at parts/ppptools.pl line
115.
adding XS code from [.parts.inc]call.
adding XS code from [.parts.inc]cop.
[snip]
What's happening is that on VMS there is really no such thing as a file with no extension, and
a file with a zero-length extension is reported by readdir() with a trailing dot (C<foo> is
really C<foo.>). The attached patch merely allows an optional trailing dot on the filename
and the warnings disappear.
Subject: | ppptools.patch.txt |
--- parts/ppptools.pl;-0 Fri Jan 4 08:10:55 2008
+++ parts/ppptools.pl Mon May 26 15:11:13 2008
@@ -110,7 +110,7 @@ sub parse_partspec
}
unless (exists $data{provides}) {
- $data{provides} = ($file =~ /(\w+)$/)[0];
+ $data{provides} = ($file =~ /(\w+)\.?$/)[0];
}
$data{provides} = [$data{provides} =~ /(\S+)/g];