From a56d54165fb4e22231640d292bcec5bebf7b2bd6 Mon Sep 17 00:00:00 2001 From: htrgouvea Date: Wed, 25 Dec 2024 17:02:38 +0300 Subject: [PATCH] remove Mojo::JSON lib --- cpanfile | 2 +- lib/Sentra/Engine/SlackWebhook.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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'