The Perl compiler tools are very powerful: I wrote a backend to implement xgettext for perl programs (needless to say using regular expressions to pick strings is not going to work very well:-).
I also wrote a module that allows the use of the gettext related functions from perl. Using closures it makes for a very easy interface also for modules. All the code that's needed is:
use gettext 'package';and then marking the strings with __:
print __"Hello, world\!n";I'll post it to CPAN for comments.