At 0:27 Uhr -0800 17.12.2002, Ben Hines wrote:
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?
Sounds good, feel free to check it in.
Max
--
-----------------------------------------------
Max Horn
Software Developer
-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now! Before the Holidays pass you by.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel