Subject: | fixpath sometimes undoes wraplist on VMS |
Because fixpath splits on whitespace, any whitespace, it can remove the newlines introduced by wraplist, though it leaves the continuation character in the list. For example, it can start with
MACRO = foo bar \
baz
and turn it into
MACRO = foo bar \ baz
which can reintroduce line length problems, but the more serious issue is that the '\' is not a valid filename and stops teh extension build in its tracks.
I encountered this in an extension that sent WriteMakefile a long list of filenames as the value for OBJECT rather than using the macro $(O_FILES). The attached patch appears to fix the problem by making fixpath split only on non-vertical whitespace (by using [[:blank:]] rather than \s+). I have not tested it extensively to see if it has any unwanted side effects.
--- lib/ExtUtils/MM_VMS.pm;-0 Mon Jan 5 17:01:10 2004
+++ lib/ExtUtils/MM_VMS.pm Tue Jan 13 23:52:58 2004
@@ -2279,10 +2279,10 @@
$self = bless {} unless ref $self;
my($fixedpath,$prefix,$name);
- if ($path =~ /\s/) {
+ if ($path =~ /[[:blank:]]/) {
return join ' ',
map { $self->fixpath($_,$force_path) }
- split /\s+/, $path;
+ split /[[:blank:]]+/, $path; # don't include newlines via \s
}
if ($path =~ m#^\$\([^\)]+\)\Z(?!\n)#s || $path =~ m#[/:>\]]#) {