The 'about' and 'legal' links in 'meta_menu' take their titles from the stories.
[gruta.git] / examples / g.cgi
blob698b9242ef1632592a107eaf8f5d6b8bd7bef166
1 #!/usr/bin/perl
3 use locale;
4 use POSIX qw (locale_h);
5 #setlocale(LC_ALL, 'es_ES');
7 use Gruta;
9 #sub BEGIN { $ENV{'DISPLAY'} = ":0.0"; } #!/usr/bin/perl -d:ptkdb
11 use Gruta::CGI;
12 use Gruta::Source::DBI;
13 use Gruta::Renderer::Grutatxt;
14 use Gruta::Renderer::HTML;
15 use Gruta::Template::Artemus;
17 my $base = '/var/www/gruta';
19 my $g = Gruta->new(
20 sources => [
21 Gruta::Source::DBI->new( string => "dbi:SQLite:$base/gruta.db" ),
23 renderers => [
24 Gruta::Renderer::Grutatxt->new(),
25 Gruta::Renderer::HTML->new(),
26 Gruta::Renderer::HTML->new( valid_tags => undef ),
28 template => Gruta::Template::Artemus->new( path =>
29 "${base}/templates" .
30 ':/usr/share/gruta/templates/artemus/ALL' .
31 ':/usr/share/gruta/templates/artemus/es'
33 cgi => Gruta::CGI->new()
36 $g->run();