LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Aristotle Pagaltzis Date: Mon Aug 4 04:01:20 2008 Subject: Re: PPI vs Acme::Bleach
* Eric Wilhelm <scratchcomputing@gmail.com> [2008-08-04 09:15]: > # from Aristotle Pagaltzis > # on Sunday 03 August 2008 21:25: > >> but if you consider all possible valid Perl code files that do >> something useful, it actually falls over most of the time. >> Grind your code through Acme::Bleach and give it PPI, f.ex.; >> you’ll get nothing interesting out the other side. > > Is all code which does something useful using Acme::Bleach? Obviously I was using “useful” in a loose sense. The point is that I mean Perl code that does something sensical; as opposed to, say, line noise that happens to compile as Perl. (Which, absent strictures, is not quite as unlikely as you might think.) > I'll not claim that PPI is perfect, but Acme::Bleach is a > terrible example of it failing -- not just pathological but not > even a true failure. I know; I chose it as a blunt and obvious case, not as a particularly good one. The matter of the fact is that anything which cannot be parsed correctly without running BEGIN blocks is going to fail. And I’m fairly sure it doesn’t even take that much to trip it up; it probably can’t untangled every obfuscated code attempt either. > So what Tom should have said is: > > Nothing but perl can interpret Perl. Yes, and any `use` line requires interpreting Perl to correctly parse any of the code that follows it. Now how many programs contain `use strict;`? Pretty much every single one of mine. Still, please understand that I am not trying to say that PPI is useless. Quite contrarily it is supremely useful. But to say that it has disproven the saying that only perl can parse Perl is wrong. PPI can only achieve usefulness, not in fact correctness. That’s a very big “only,” mind. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>
| Navigate in group perl.module-authors at sever nntp.perl.org | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |