diff --git a/cpanfile b/cpanfile index 13ccd9a..fa884d9 100644 --- a/cpanfile +++ b/cpanfile @@ -1,6 +1,6 @@ requires "Getopt::Long", "2.54"; requires "Mojo::UserAgent"; -requires "Mojo::JSON"; +requires "JSON"; requires "DateTime"; requires "DateTime::Format::ISO8601"; diff --git a/lib/Sentra/Engine/SlackWebhook.pm b/lib/Sentra/Engine/SlackWebhook.pm index 04fd86d..0d0dc2a 100644 --- a/lib/Sentra/Engine/SlackWebhook.pm +++ b/lib/Sentra/Engine/SlackWebhook.pm @@ -2,13 +2,13 @@ package Sentra::Engine::SlackWebhook { use strict; use warnings; use Mojo::UserAgent; - use Mojo::JSON qw(encode_json); + use JSON; sub new { my ($class, $message, $webhook) = @_; my $userAgent = Mojo::UserAgent -> new(); - my $payload = encode_json({text => $message}); + my $payload = encode_json({ text => $message }); my $text = $userAgent -> post($webhook => { 'Content-Type' => 'application/json'