in reply to Require everything between innermost <code></code> tags to compile.

That definitely wouldn't work for me. There are many times that I put CODE tags around snippets inline, simply because I use a lot of brackets in the code I write.

Also, there's really no way to do this safely. Compilation of code can always involve arbitrary execution of code, thanks to BEGIN blocks. Which means the compilation would have to be in a Safe compartment, and there's issues around that. Big issues.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Require everything between innermost <code></code> tags to compile.

Replies are listed 'Best First'.
Re^2: Require everything between innermost <code></code> tags to compile.
by Aristotle (Chancellor) on Aug 02, 2003 at 21:19 UTC
    I'm curious. What kind of big issues?

    Makeshifts last the longest.

      For one, there's no protection against using up tons of memory. Someone could easily write code like "my @foo = 1..1e6; while(1) { push @foo, @foo }" and Safe will allow it.

      --MrNobo1024
      s]]HrLfbfe|EbBibmv]e|s}w}ciZx^RYhL}e^print

      {redo}
      It's not 100% safe.

      Liz

        Well, that's as much as merlyn already said, which is not a whole lot, and is why I asked more in the first place.

        Makeshifts last the longest.