guestbook-ng/lib/GuestbookNg/Model/Test.pm
2021-12-04 23:06:05 -05:00

22 lines
311 B
Perl

#!/usr/bin/env perl
package GuestbookNg::Model::Test;
use Mojo::Base -base, -signatures;
has 'pg';
sub new($class, $pg, $object) {
bless {$pg => $object}
}
sub test_model($self, $string) {
"you've supplied: $string"
}
sub now($self) {
$self->pg->db->query('SELECT NOW() AS now')->text()
}
1;