The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use inc::Module::Install;

#die "This RT Extension will kill your pets and steal your valuables. DO NOT USE IT YET";
RTx ('RT-Extension-CommandByMail');
author_from ('lib/RT/Extension/CommandByMail.pm');
license('perl');
readme_from 'lib/RT/Extension/CommandByMail.pm', { options => [quotes => 'none'] };

build_requires('Test::More');
build_requires('IPC::Open2');

# the patch for RT-3.4.5 has this requirement
# RT may be require it too, but put it here to be sure 
requires('UNIVERSAL::require');
requires('MIME::Entity' => '5.420');
auto_install();

my ($lp) = ($INC{'RT.pm'} =~ /^(.*)[\\\/]/);
my $lib_path = join( ' ', "$RT::LocalPath/lib", $lp );
my $sbin_path = $RT::SbinPath || "$RT::BasePath/sbin" || "/opt/rt3/sbin";
my $bin_path = $RT::BinPath || "$RT::BasePath/bin" || "/opt/rt3/bin";

substitute(
    {
        RT_LIB_PATH  => $lib_path,
        RT_BIN_PATH  => $bin_path,
        RT_SBIN_PATH => $sbin_path,
    },
    qw(lib/RT/Extension/CommandByMail/Test.pm),
);

no_index package => 'RT::Extension::CommandByMail::Test';

author_tests('xt');

sign;
WriteAll();