|Subject:||Calling a subroutine with a heredoc as a parameter breaks Text::Balanced::extract_multiple.|
Calling a subroutine with a heredoc as a parameter breaks Text::Balanced::extract_multiple. (see simplified.pm for example) I discovered this while trying to make Filter::Simple work for some modules I have and am trying to condense a little. The actual error message is in the _success module when there is a 'FILLET' (beginning at line 69). It looks like what is being attempted in this algorithm is the heredoc is to be excised while leaving any additional text on the same line after the heredoc begin alone. The problem I see here is that the algorithm is attempting to do this from a fragment of the original text with numbers relating to the full text. my $extra = substr($res, $extrapos-$startlen, $extralen, "\n"); The values in $extrapos, $startlen and $extralen are all relative to the original text. The only one that matters though is $extrapos, which in my example code is 92, but in $res is 0. Either $res needs to be changed to $$textref or '$extrapos-$startlen' needs to be changed to $startlen. I think. I haven't had the chance to fully analyze everything that would be affected by any of this. So I apologize if I've missed something incredibly stoopid. If I can be of further assistance please feel free to contact me. Check attached file 'explain.txt' for system information. Alan Young email@example.com
Message body not shown because it is not plain text.