lugin::Result;
use JSON;
has 'sql_query' => (
is => 'rw', isa => 'Str',
default => 'SELECT config FROM user_config WHERE address=?',
);
has '_json' => (
is => 'ro', isa => 'JSON', lazy => 1,
def
ault => sub {
return JSON->new;
}
);
has 'field' => ( is => 'rw', isa => 'Str', default => 'recipient' );
with 'Mail::MtPolicyd::Role::Connection' => {
name => 'db',
type => 'Sql',
};
with 'M
self->sql_query, $key );
my ( $json ) = $sth->fetchrow_array;
if( ! defined $json ) {
die( 'no user-config found for '.$key );
}
return $self->_json->decode( $json );
}
sub run {
my ( $self, $