http://www.perlmonks.org?node_id=513521


in reply to Filter::Simple bug with here documents

Don't do that!

FILTER_ONLY will always have bugs. Just don't use it! It is really just that simple.

And the problem mysteriously goes away.

Yes. Didn't you learn anything from people's attempt to use Switch.pm?? Things mysteriously break (and mysteriously unbreak). Just STOP IT!

You actually can write reasonable source filters for Perl. You just need to avoid trying to not have your filter apply to quoted things (or other subsets of Perl syntax). So define your own way to escape things for places when the filter would be a pain. And define your custom syntax so you don't need to escape away from it much.

And never, never use FILTER_ONLY!

- tye        

  • Comment on Re: Filter::Simple bug with here documents (duh!)

Replies are listed 'Best First'.
Re^2: Filter::Simple bug with here documents (duh!)
by Ovid (Cardinal) on Dec 02, 2005 at 06:13 UTC

    Can you provide some context for these dire warnings?

    Cheers,
    Ovid

    New address of my CGI Course.

      FILTER_ONLY tries to parse Perl code. Did you really not realize this or not realize that such is doomed and thus something quite foolish to include in production code?

      - tye        

        I knew this, but I was hoping that the Text::Balanced code it was dependent on was limited in scope enough to minimize the problem. I was wrong.

        Cheers,
        Ovid

        New address of my CGI Course.