encoding::source

rafael on 2007-06-21T08:04:09

I'm happy to announce to the unsuspecting world that I've released to the CPAN a new Perl module, encoding::source. Like I say in the docs, this is like the encoding pragma, but done right. In other words, it allows you to change, on a per-file or per-block basis, the encoding of the string literals in your programs.

That's probably some of the scariest Perl code I've written. Note that it won't run on any released perl. You'll nead bleadperl (or the upcoming 5.9.5) for that. That's because it uses the new support for user-defined lexical pragmas.

(also published at consttype)