halfcountplus has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone here who uses mason and vim know how to get around this "glitch" with syntax highlighting in vim:
% elsif (exists $ARGS{change_subj}) { % $db->do(<<"DONE"); % update docdirs set title='$ARGS{title}', subj_id='$ARGS{subjid +}', % pages='$ARGS{pages}' where id='$ARGS{change_dd}';"); %DONE
is all fine and works but vim runs fowl of %DONE and the highlighting is all screwed up after that. I looked thru perl.vim and found the section dealing with here docs, but I obviously cannot figure it out because inserting a few ".?" did not work for me. I tried taking it right out but -- surprise surprise, then the here doc syntax is an error to vim and the highlighting after that is affected.

If anyone has a quick fix for this I'd be oh so grateful...

Replies are listed 'Best First'.
Re: vim syntax file w/ mason & "here documents"
by halfcountplus (Hermit) on Jun 15, 2009 at 23:58 UTC
    It hit me doing the dishes: vim does not have a "zero or one" match, you have to use .* (not .?)
Re: vim syntax file w/ mason & "here documents" [SOLVED]
by repellent (Priest) on Jun 16, 2009 at 03:35 UTC
    What's with the (runaway) double-quote?
    % pages='$ARGS{pages}' where id='$ARGS{change_dd}';"); ^