On Thu, 25 Nov 2004 22:00:03 +1100, Adam Kennedy <[EMAIL PROTECTED]> wrote:
And just after the snip you will see I qualify "parse" in this context as loading the perl in some form of DOM-type tree.
And yet you disqualify the Perl6 rule system, with its tree of match objects? What, exactly, is it that you want?
What I'm after are 3 critical features.
1. You always get back out what you put in. $source eq serialize(parse($source)).
2. No side effects. Autrijus Tang suggests this may be workable
3. You can parse a document with broken dependencies. There are a myriad of these situations, such as
- Dependencies you don't have
- Editing on different platform to execution platform (think Win32:: or S390/mainframe/GridComputing)
- Unfinished code
- Things you can't get installed (ImageMagick etc)
- Example code that will never be executed
(Imagine if you will a mod_perl syntax highlighting module for search.cpan.org. Should the search.cpan.org host have to _install_ every single one of the modules in CPAN?)
PPI can do all of these 3 things. Not 100% reliably, but for "normal" code (where "normal" is actually defined fairly broadly).
In any case, I would like to suspend this debate for a week, as I'll be talking with Damian (hopefully) at YAPC.AU. I'll report back afterwards, having hopefully imparted the full extent of my problem.
Perl 6 rules or some variation therein may indeed be what I'm after, although I need to find out more about the internals.
Do we have a working version yet I can create some demonstrations with?
Adam