Can I use StringTemplate with Perl?

Jonathan Buhacoff writes that he was able to get ST working with Perl easily using Inline::Java module.

use strict;
use warnings;
use Inline
    Java => 'STUDY',
    STUDY => [ qw(
    ) ],
    AUTOSTUDY => 1,
    PACKAGE => 'main';

my $t = org::antlr::stringtemplate::StringTemplate->new('hello $name$
my $out = $t->toString();
print $out;

This requires Inline::Java to be installed on the system, and for the
CLASSPATH environment variable to include the antlr and stringtemplate
jar files.