DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33590>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33590

           Summary: lost '#'s inside #literal()/#end
           Product: Velocity
           Version: 1.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Source
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


I am using VTL (with VPP) to customize a portion of a Perl script. Since Perl
code has a lot of dollar signs, I am using #literal()/#end to prevent Velocity
from processing most of the file.  What I find is that single '#' characters
that are not followed by alpha text are removed (inside #literal()/#end).

For example:

  #literal()
  #!/usr/bin/perl
  #end

becomes:

  !/usr/bin/perl

I've tried things like escaping the '#' ('\#') but that leaves the backslash
('\#!/usr/bin/perl' becomes '\!/usr/bin/perl').  Nothing seems to work.

I can use a #set to define a variable with the value '#!/usr/bin/perl', but I
was hoping I would not have to.  It also doesn't help with other single #'s in
the file (like Perl comments).  For those I have had to double up the hashes.

I'd be happy to try patching the Velocity source, but I had trouble making heads
or tails of the parser engine?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to