diff options
Diffstat (limited to 'lib/JWebmail/Model/ReadMails')
-rw-r--r-- | lib/JWebmail/Model/ReadMails/MockJSON.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/JWebmail/Model/ReadMails/MockJSON.pm b/lib/JWebmail/Model/ReadMails/MockJSON.pm index 9ad5f09..70daf8f 100644 --- a/lib/JWebmail/Model/ReadMails/MockJSON.pm +++ b/lib/JWebmail/Model/ReadMails/MockJSON.pm @@ -8,7 +8,13 @@ use autodie; use List::Util 'sum'; use JSON::PP 'decode_json'; -use Digest::HMAC_MD5 'hmac_md5_hex'; +use JWebmail::Config 'LOGIN_SCHEME'; + +if (LOGIN_SCHEME eq fc 'cram_md5') { + require Digest::HMAC_MD5; + Digest::HMAC_MD5->import('hmac_md5_hex'); +} + use Role::Tiny::With; use namespace::clean; |