Looking at Macro::Parser at first I had an idea that everything that looks like a word with a pair of parentheses would probably be tried as macro Perl subroutine and everything would be screwed up because of similar errors everywhere.
But then, I've realized that somebody screwed regexps for parsing macro @keywords() and that was eventually copypasted to subroutines parser. It sure can work correctly sometimes because that's more like a detection and real work is done with Text::Balanced, but really, wtf?
EternalHarvest wrote:Looking at Macro::Parser at first I had an idea that everything that looks like a word with a pair of parentheses would probably be tried as macro Perl subroutine and everything would be screwed up because of similar errors everywhere.
But then, I've realized that somebody screwed regexps for parsing macro @keywords() and that was eventually copypasted to subroutines parser. It sure can work correctly sometimes because that's more like a detection and real work is done with Text::Balanced, but really, wtf?
But i guess the screwed regexps that ezza (i think u did refer to this lady) used that caused error in this prob is just a detection issue and actually it works perfect in terms of subroutine detection, is it? To solve this small prob in the print/log command i guess is, we can ignore the subroutine detection(in parseCmd) if it came from the log command script in Script.Pm at 1st sight since the subroutine function is not supposed to be used in the log line. This idea, i think ezza is lacking at that time... sorry if i offended any1 in any terms, its just my 2 cents
sorry.. and what is the other commands that will caused error other than "log" that ppl will use word\s + a pair of round bracket inside a macro script line? your info is highly appreciated since i did little mods to my macro script. Thx.
EternalHarvest wrote:It's questionable whether subroutines are supposed to be used in the "log" or not. That problem can arise with other commands too.
May-be Modify it to use Text::Balanced and properly parse any case of macro cmd?