Extending Perl

rafael on 2002-01-30T22:42:27

I was thinking about the multiple ways to extend Perl's syntax and semantics. There are :

  • ties, for new magic variables
  • builtin overriding
  • operator overloading
  • the coderef-in-@INC feature, undocumented in 5.6.1
  • source filters (using, for example, Filter::Simple); my module Sub::Quotelike uses this technique.
  • for wizards : Simon Cozens' B::Generate module, that allows a perl program to modify it's own internal optree. (I haven't used it.)
Is there something missing ?

I also played with the first release of Simon's Perl 6 tokenizer. Great draft, I hope I'll have more time to look at it (and at Perl 6 parsing) soon.