On Tuesday, December 17, 2002, at 12:11  AM, Patrick Sodré wrote:

Sounds like a bug... or maybe something that fink validate should take care of informing.
Also... it is almost impossible to figure out which "here-document" didn't close, is it possible to enhance the code to print out the order that it opened and closed the "here-documents"
Services.pm has:

if (/^\s*<<$/) {
$heredoc--;
$hash->{$lastkey} .= $_."\n" if ($heredoc > 0);
} else {
$hash->{$lastkey} .= $_."\n";
$heredoc++ if (/<<$/);
}


A possible fix would be to make that:


if (/^\s*<<\s*$/) {
$heredoc--;
$hash->{$lastkey} .= $_."\n" if ($heredoc > 0);
} else {
$hash->{$lastkey} .= $_."\n";
$heredoc++ if (/<<\s*$/);
}

Whitespace is already accepted after the << which BEGINS a here-doc section:


{
next if /^\s*\#/; # skip comments
if (/^([0-9A-Za-z_.\-]+)\:\s*(\S.*?)\s*$/) {
$lastkey = $notLC ? $1 : lc $1;
if ($2 eq "<<") {
$hash->{$lastkey} = "";
$heredoc = 1;
} else {
$hash->{$lastkey} = $2;
}
} elsif (/^\s+(\S.*?)\s*$/) {
$hash->{$lastkey} .= "\n".$1;
}
}

Sound good?

-Ben


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel


Reply via email to