in reply to Home made operands
feature::qw_comments makes a new keyword called qw. Ok, there's already one called qw, but the module completely replaces it. The same API can be used to make entirely new keywords.
It uses an interface added to Perl in 5.14. This interface is much more resilient than source filters, and much more usable than Devel::Declare.
It cannot be used to create symbolic (e.g. "+") operators, or anything but prefix operators/keywords (e.g. KEYWORD SOMETHING, not SOMETHING KEYWORD or SOMETHING KEYWORD SOMETHING).
It can be used to introduce a section of code that's not Perl, just like m/ introduces a section of code that's a regexp, not Perl. For example, one could use this interface to create a keyword that indicates the start of a snippet of Lisp grammar.
|
|---|