My understanding is that Perl 6 is the polar opposite of lisp, in this sense: In lisp, the code is always and everywhere already in a parse tree, and can be manipulated easily by, e.g., macros; Perl 5, on the other hand, is the most unparsable language possible: see http://www.perlmonks.org/?node_id=663393. What perl 6 does is own the parsing problem, and respond by incorporating super powerful parsing tools. Unfortunately, I believe that perl 6 retains its dynamic syntax, so parsing of perl 6 itself is still an uncertain adventure, and not something one can incorporate unconstrained into one's metaprogramming. I'd love to be wrong about that; am I? If so, can someone recommend a tutorial on perl 6 metaprogramming?
You don't have to parse Perl 6 's grammar ... the parser is written for you.
How it goes ... you add rules for new syntax, and your macro-handler receives a syntax tree. And you transform that into a regular AST that the interpreter can understand ... more or less as in LISP.
The difference is that in LISP you work directly with ASTs ... while in Perl you can access the compiler's pipeline.
This idea is not new ... for instance it's also implemented in Boo (boo.codehaus.org) ... although I don't know how effective is.
Well, I'm just learning Perl (work related) and it certainly feels like they tried to include a lot of ready-to-use lisp-like macros in an otherwise traditional syntax when inventing Perl.
And Perl 5.12 has this jewel in its changelog:
New experimental APIs allow developers to extend Perl with "pluggable" keywords and syntax.
Which is already doable from CPAN using Devel::Declare, hence Method::Signatures::Simple, Sub::Curried, MooseX::Method::Signatures etc.
The stuff in core is, however, way, way more elegant than the way Devel::Declare currently does it - which was rather the point, Devel::Declare was "retrofit to existing perl5 VMs what will hopefully be core later".
I have one simple test to determine is something is a Lisp. Does it fit the statement "The program is the data"? It is a simple statement that implies a whole lot of power in a language, like the ability for a program to create a new program.
"Ability" doesn't imply "first-class support" or "good idea". In languages that aren't Lisp this usually ends up being done by passing a raw string to eval() which is extremely error prone. It's not something you do lightly.
Constructing macros in Lisp however /is/ something you do lightly. A typical lisp program might have a 20/80 division of macros/functions. You aren't going to see a sane program in other languages that do the same thing.