4 use Gruta
::Source
::DBI
;
6 #my $src = Gruta::Source::FS->new(
7 # path => '/home/angel/tmp/gruta-test'
9 my $src = Gruta
::Source
::DBI
->new(
10 string
=> 'dbi:SQLite:/home/angel/tmp/gruta-test.db'
15 my $c = Gruta
::Data
::Comment
->new();
17 $c->set('topic_id', 'main');
18 $c->set('story_id', 'index');
19 $c->set('content', 'This is <b>a</b> comment.');
21 $c = $src->insert_comment($c);
23 my $c2 = $src->comment('main', 'index', $c->get('id'));
25 print $c2->get('id'), "\n";
27 my @p = $src->pending_comments();