From 4ca8ebdd1515b1f1e01d0bd950059cc049fc0c42 Mon Sep 17 00:00:00 2001 From: swag Date: Wed, 12 Oct 2022 10:36:44 -0400 Subject: [PATCH] Make this match the style in the docs just in-case --- lib/PostText.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/PostText.pm b/lib/PostText.pm index 9a8bb34..9d45f6b 100644 --- a/lib/PostText.pm +++ b/lib/PostText.pm @@ -13,16 +13,16 @@ sub startup($self) { $self->plugin(AssetPack => {pipes => [qw{Css Combine}]}); # Helpers - $self->helper(pg => sub ($c) { - state $pg = Mojo::Pg->new($c->config->{$self->mode}{'pg_string'}) + $self->helper(pg => sub { + state $pg = Mojo::Pg->new(shift->config->{$self->mode}{'pg_string'}) }); - $self->helper(thread => sub ($c) { - state $thread = PostText::Model::Thread->new(pg => $c->pg) + $self->helper(thread => sub { + state $thread = PostText::Model::Thread->new(pg => shift->pg) }); - $self->helper(remark => sub ($c) { - state $remark = PostText::Model::Remark->new(pg => $c->pg) + $self->helper(remark => sub { + state $remark = PostText::Model::Remark->new(pg => shift->pg) }); $self->helper(truncate_text => sub ($c, $input_text) {