From dc6ef77754407eaeff44c50a5d7d06637d64a602 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Thu, 4 Jul 2024 01:17:58 -0400 Subject: [PATCH] housecleaning --- guestbook-ng.pl | 3 +-- lib/GuestbookNg/Model/Counter.pm | 4 ---- lib/GuestbookNg/Model/Message.pm | 7 ------- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/guestbook-ng.pl b/guestbook-ng.pl index db54bd0..63f29a3 100755 --- a/guestbook-ng.pl +++ b/guestbook-ng.pl @@ -9,7 +9,6 @@ use List::Util qw{shuffle}; use Regexp::Common qw{URI}; use Number::Format qw{format_number}; use WebService::Discord::Webhook; -#use Data::Dumper; # Uncomment for debugging # Load the model use lib 'lib'; @@ -19,7 +18,7 @@ use GuestbookNg::Model::Counter; # Plugins plugin 'Config'; plugin 'TagHelpers::Pagination'; -plugin AssetPack => {pipes => [qw{Css JavaScript Combine}]}; +plugin AssetPack => {pipes => [qw{Css Combine}]}; # Helpers helper pg => sub { diff --git a/lib/GuestbookNg/Model/Counter.pm b/lib/GuestbookNg/Model/Counter.pm index a147f68..7734b55 100644 --- a/lib/GuestbookNg/Model/Counter.pm +++ b/lib/GuestbookNg/Model/Counter.pm @@ -4,10 +4,6 @@ use Mojo::Base -base, -signatures; has 'pg'; -sub new($class, $pg, $pg_object) { - bless {$pg => $pg_object}, $class -} - sub get_visitor_count($self) { $self->pg->db->query(<<~'END_SQL')->text() SELECT counter_value diff --git a/lib/GuestbookNg/Model/Message.pm b/lib/GuestbookNg/Model/Message.pm index 6c7b547..e7f950f 100644 --- a/lib/GuestbookNg/Model/Message.pm +++ b/lib/GuestbookNg/Model/Message.pm @@ -4,13 +4,6 @@ use Mojo::Base -base, -signatures; has 'pg'; -sub new($class, $pg, $pg_object) { - bless { - $pg => $pg_object, - max_posts => 5 - }, $class -} - sub get_posts($self, $this_page = undef) { if ($this_page) { my $row_count = $self->{'max_posts'};