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) {