use Text::MicroMason; $interpreter = Text::MicroMason->new( -HTMLTemplate ); $template = "bar foo bar BAAAR!"; $subroutine = $interpreter->compile( $template ); $output = $subroutine->( var1=>"Guybrush", var2=>"Purcell" );