Use File::Share(Dir) for templates
[app-edwardng.git] / lib / App / EdwardNG.pm
index a9cac089365c515bf4f89e67d2b7a7c3d17b1d8d..4da1968ce2ab082321fc2ea5b334252f2ee6767e 100644 (file)
@@ -8,6 +8,7 @@ our $VERSION = '0.001';
 our @EXPORT = qw/process_message/;
 
 use Email::Sender::Simple qw/sendmail/;
+use File::Share qw/dist_file/;
 use File::Slurp qw/read_file/;
 use File::Spec::Functions qw/rel2abs/;
 use Getopt::Long;
@@ -117,7 +118,7 @@ sub run {
 
        $params{plaintext} = first_part $params{decrypted} if $params{decrypted};
 
-       my $tt = Template->new(INCLUDE_PATH => rel2abs $tmpl_path, 'tmpl');
+       my $tt = Template->new(INCLUDE_PATH => rel2abs $tmpl_path, dist_file 'App-EdwardNG', 'tmpl');
        my $data;
        $tt->process($tmpl, \%params, \$data);
        my $email = MIME::Entity->build(
This page took 0.009553 seconds and 4 git commands to generate.