Version 2.0.0-rc1 RELEASED.
[gruta.git] / examples / g.cgi
blob44725b0b65d145b76987e465a2ed03f0c9cc42e1
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 => "$base/templates" ),
29 cgi => Gruta::CGI->new()
32 $g->run();