On Tue, Jun 28, 2005 at 01:19:20PM +1000, Adam Kennedy wrote:
> >Yes... quasiquoting in Perl 5 is currently crudely emulated
> >by feeding things to PPI::Tokenizer and PPI::Transform. :-)
> 
> PPI is not a code parser. By code parser I mean taking a string and 
> turning it into working code. PPI is a document parser. It parses ONLY 
> on syntax to form a model of a document. Any conclusions it might make 
> on the structure of the resulting code are secondary.

Right.  Hence it guarantees at most well-formness, instead of semantic
correctness.  Hence, "crudely emulated", because we don't have anything
better at this moment.

> So to summarise, PPI is of limited use when it comes to working with 
> bytecode or something that will be executed. It is for working with 
> documents, not code.

Yup.  But PPI is still much better than consuming and concatenating
raw strings. :-)

Thanks,
/Autrijus/

Attachment: pgpl5q0ig4i7T.pgp
Description: PGP signature

Reply via email to