t/keydir/pubring.gpg
t/keydir/secring.gpg
t/keydir/trustdb.gpg
-tmpl/en/encrypt
-tmpl/en/encrypt_error
-tmpl/en/error
-tmpl/en/plain
-tmpl/en/sign
-tmpl/en/sign_error
-tmpl/en/signencrypt
+share/tmpl/en/encrypt
+share/tmpl/en/encrypt_error
+share/tmpl/en/error
+share/tmpl/en/plain
+share/tmpl/en/sign
+share/tmpl/en/sign_error
+share/tmpl/en/signencrypt
use 5.014000;
use ExtUtils::MakeMaker;
+use File::ShareDir::Install;
+
+install_share 'share';
WriteMakefile(
NAME => 'App::EdwardNG',
SIGN => 1,
PREREQ_PM => {
qw/Email::Sender::Simple 0
+ File::Share 0
File::Slurp 0
Getopt::Long 0
MIME::Entity 5.419
Mail::GnuPG 0
PerlX::Maybe 0
Template 0
- Try::Tiny 0/
+ Try::Tiny 0/,
+ },
+ BUILD_REQUIRES => {
+ qw/ExtUtils::MakeMaker 0
+ File::ShareDir::Install 0/,
},
META_MERGE => {
dynamic_config => 0,
}
}
);
+
+package MY;
+use File::ShareDir::Install qw/postamble/;
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;
$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(
--- /dev/null
+Message decrypted successfully.
+
+You said:
+[% plaintext %]
+
+GnuPG said:
+[% message %]
\ No newline at end of file
--- /dev/null
+Could not decrypt message: [% message %]
\ No newline at end of file
--- /dev/null
+Error while processing message: [% message %]
\ No newline at end of file
--- /dev/null
+This message is neither signed nor encrypted.
\ No newline at end of file
--- /dev/null
+This message is correctly signed with key [% keyid %] from [% email %].
+
+GnuPG said:
+[% message %]
\ No newline at end of file
--- /dev/null
+Could not verify message signature: [% message %]
\ No newline at end of file
--- /dev/null
+Message encrypted and signed with key [% keyid %] from [% email %].
+
+You said;
+[% plaintext %]
+
+GnuPG said:
+[% message %]
\ No newline at end of file
+++ /dev/null
-Message decrypted successfully.
-
-You said:
-[% plaintext %]
-
-GnuPG said:
-[% message %]
\ No newline at end of file
+++ /dev/null
-Could not decrypt message: [% message %]
\ No newline at end of file
+++ /dev/null
-Error while processing message: [% message %]
\ No newline at end of file
+++ /dev/null
-This message is neither signed nor encrypted.
\ No newline at end of file
+++ /dev/null
-This message is correctly signed with key [% keyid %] from [% email %].
-
-GnuPG said:
-[% message %]
\ No newline at end of file
+++ /dev/null
-Could not verify message signature: [% message %]
\ No newline at end of file
+++ /dev/null
-Message encrypted and signed with key [% keyid %] from [% email %].
-
-You said;
-[% plaintext %]
-
-GnuPG said:
-[% message %]
\ No newline at end of file