requires 'perl', '5.26.3';

# Core dependencies
requires 'Apache::Session', '>= 1.53';
requires 'Business::Hours';
requires 'CGI', ($] >= 5.019003 ? '>= 4.00' : '>= 3.38');
requires 'CGI::Cookie', '>= 1.20';
requires 'CGI::Emulate::PSGI';
requires 'CGI::PSGI', '>= 0.12';
requires 'Class::Accessor::Fast';
requires 'Clone';
requires 'Convert::Color';
requires 'Imager';
requires 'Crypt::Eksblowfish';
requires 'CSS::Minifier::XS';
requires 'CSS::Squish', '>= 0.06';
requires 'CSS::Inliner', '>= 4027';
requires 'Data::GUID';
requires 'Data::ICal';
requires 'Data::Page';
requires 'Date::Extract', '>= 0.07';
requires 'Date::Manip';
requires 'DateTime', '>= 0.44';
requires 'DateTime::Format::Natural', '>= 0.67';
requires 'DateTime::Locale', '>= 0.40, != 1.00, != 1.01';
requires 'DateTime::Set';
requires 'DBI', '>= 1.37';
requires 'DBIx::SearchBuilder', '>= 1.85';
requires 'Devel::GlobalDestruction';
requires 'Devel::StackTrace', '>= 1.19, != 1.28, != 1.29';
requires 'Digest::base';
requires 'Digest::MD5', '>= 2.27';
requires 'Digest::SHA';
requires 'Email::Address', '>= 1.912';
requires 'Email::Address::List', '>= 0.06';
requires 'Encode', '>= 2.64';
requires 'Encode::Detect::Detector';
requires 'Encode::HanExtra';
requires 'Errno';
requires 'File::Glob';
requires 'File::ShareDir';
requires 'File::Spec', '>= 0.8';
requires 'File::Temp', '>= 0.19';
requires 'Hash::Merge';
requires 'Hash::Merge::Extra';
requires 'HTML::Entities';
requires 'HTML::FormatExternal';
requires 'HTML::FormatText::WithLinks', '>= 0.14';
requires 'HTML::FormatText::WithLinks::AndTables', '>= 0.06';
requires 'HTML::Gumbo';
requires 'HTML::Mason', '>= 1.43';
requires 'HTML::Mason::PSGIHandler', '>= 0.52';
requires 'HTML::Quoted';
requires 'HTML::RewriteAttributes', '>= 0.06';
requires 'HTML::Scrubber', '>= 0.08';
requires 'HTTP::Message', '>= 6.46';
requires 'IPC::Run3';
requires 'JavaScript::Minifier::XS';
requires 'JSON';
requires 'List::MoreUtils', '>= 0.420';
requires 'Locale::Maketext', '>= 1.06';
requires 'Locale::Maketext::Fuzzy', '>= 0.11';
requires 'Locale::Maketext::Lexicon', '>= 0.32';
requires 'Log::Dispatch', '>= 2.30';
requires 'LWP::Simple';
requires 'Mail::Header', '>= 2.12';
requires 'Mail::Mailer', '>= 1.57';
requires 'MIME::Entity', '>= 5.504';
requires 'MIME::Types';
requires 'Module::Refresh', '>= 0.03';
requires 'Module::Runtime';
requires 'Module::Versions::Report', '>= 1.05';
requires 'Net::CIDR';
requires 'Net::IP';
requires 'Parallel::ForkManager';
requires 'Plack', '>= 1.0002';
requires 'Plack::Handler::Starlet';
requires 'Regexp::Common';
requires 'Regexp::Common::net::CIDR';
requires 'Regexp::IPv6';
requires 'Role::Basic', '>= 0.12';
requires 'Scalar::Util';
requires 'Scope::Upper';
requires 'Storable', '>= 2.08';
requires 'Symbol::Global::Name', ($] >= 5.019003 ? '>= 0.05' : '>= 0.04');
requires 'Sys::Syslog', '>= 0.16';
requires 'Text::Password::Pronounceable';
requires 'Text::Quoted', '>= 2.07';
requires 'Text::Template', '>= 1.44';
requires 'Text::WikiFormat', '>= 0.76';
requires 'Text::WordDiff';
requires 'Text::Wrapper';
requires 'Time::Local', '>= 1.27';
requires 'Time::HiRes';
requires 'Time::ParseDate', '>= 2026.0219';
requires 'Tree::Simple', '>= 1.04';
requires 'URI', '>= 1.59';
requires 'URI::QueryParam';
requires 'XML::RSS', '>= 1.05';

# Mailgate
requires 'Getopt::Long';
requires 'LWP::Protocol::https';
requires 'LWP::UserAgent', '>= 6.02';
requires 'Mozilla::CA';
requires 'Pod::Usage';

# CLI
requires 'Getopt::Long', '>= 2.24';
requires 'HTTP::Request::Common';
requires 'LWP', '>= 6.02';
requires 'Term::ReadKey';
requires 'Term::ReadLine';
requires 'Text::ParseWords';

# REST2
requires 'Module::Runtime';
requires 'Moose';
requires 'MooseX::NonMoose';
requires 'MooseX::Role::Parameterized';
requires 'namespace::autoclean';
requires 'Sub::Exporter';
requires 'Web::Machine' => '>= 0.12';
requires 'Module::Path';
requires 'Path::Dispatcher' => '>= 1.07';

on 'develop' => sub {
    requires 'Email::Abstract';
    requires 'File::Find';
    requires 'File::Which';
    requires 'HTML::Entities';
    requires 'Locale::PO';
    requires 'Log::Dispatch::Perl';
    requires 'Mojolicious', '!= 8.54';
    requires 'Plack::Middleware::Test::StashWarnings', '>= 0.08';
    requires 'Pod::Simple', '>= 3.24';
    requires 'Set::Tiny';
    requires 'String::ShellQuote';
    requires 'Test::Builder', '>= 0.90';
    requires 'Test::Deep';
    requires 'Test::Email';
    requires 'Test::Expect', '>= 0.31';
    requires 'Test::LongString';
    requires 'Test::MockTime';
    requires 'Test::MockTime::HiRes';
    requires 'Test::NoWarnings';
    requires 'Test::Pod';
    requires 'Test::Warn';
    requires 'Test::WWW::Mechanize', '>= 1.30, != 1.56, != 1.58';
    requires 'Test::WWW::Mechanize::PSGI';
    requires 'Try::Tiny';
    requires 'WWW::Mechanize', '>= 1.80';
    requires 'XML::Simple';
    requires 'Markdown::Render';
    requires 'Test::Selenium::Remote::Driver';
    requires 'HTML::Selector::XPath';
};


# Deployment options
feature 'standalone' => sub {};

feature 'fastcgi' => sub {
    requires 'FCGI', '>= 0.74';
};

feature 'modperl2' => sub {};


# Database options
feature 'mysql' => sub {
    requires 'DBD::mysql', '>= 2.1018, != 4.042';
};

feature 'mysql5' => sub {
    requires 'DBD::mysql', '>= 2.1018, != 4.042, < 5.001';
};

feature 'mariadb' => sub {
    requires 'DBD::mysql', '>= 2.1018, != 4.042, < 5.001';
};

feature 'oracle' => sub {
    requires 'DBD::Oracle', '!= 1.23';
    requires 'DBIx::SearchBuilder', '!= 1.81';
};

feature 'pg' => sub {
    requires 'DBD::Pg', '>= 3.008';
};

feature 'sqlite' => sub {
    requires 'DBD::SQLite', '>= 1.72';
};


# Optional features
feature 'gpg' => sub {
    requires 'File::Which';
    requires 'GnuPG::Interface', '>= 1.02';
    requires 'PerlIO::eol';
};

feature 'smime' => sub {
    requires 'Crypt::X509';
    requires 'File::Which';
    requires 'String::ShellQuote';
};

feature 'graphviz' => sub {
    requires 'GraphViz2';
    requires 'IPC::Run', '>= 0.90';
};

feature 'externalauth' => sub {
    requires 'Net::SSLeay';
    requires 'Net::LDAP';
    on 'develop' => sub {
        requires 'Net::LDAP::Server::Test';
    };
};

feature 'dashboard-chart-emails' => sub {
    requires 'WWW::Mechanize::Chrome';
};

# External attachment storage
feature 's3' => sub {
    requires 'Amazon::S3';
};

feature 'dropbox' => sub {
    requires 'WebService::Dropbox';
};
