... use HTML::Mason::Interp; my $mi = HTML::Mason::Interp->new(data_dir => '/a/good/data/dir/', comp_root => '/a/good/comp/root/', ); my $c = $mi->make_component(comp_file => $testPath ); my $output = $mi->exec($c);