- or download this
# lib/Blog/Controller/Root.pm
package Blog::Controller::Root;
...
sub end : ActionClass('RenderView') {
}
- or download this
# lib/Blog/View/TD/Main.pm
package Blog::View::TD::Main;
...
1;
__END__
- or download this
# lib/Blog/Model/DBIC.pm
package Blog::Model::DBIC;
...
);
1;
- or download this
# Create Schema
perl script/blog_create.pl model DBIC DBIC::Schema Blog::Schema create
+=static DBI:SQLite:root/catalyst
# Create View
perl script/blog_create.pl view TD Template::Declare
- or download this
# Edit Makefile.PL
$ diff Makefile.PL~ Makefile.PL
...
perl Makefile.PL
sudo make installdeps
sudo make test
- or download this
$ perl script/blog_server.pl -r -d
[debug] Debug messages enabled
...
[info] Blog powered by Catalyst 5.7011
You can connect to your server at http://localhost:3000
- or download this
[info] *** Request 1 (0.027/s) [17489] [Mon Oct 22 15:29:38 2007] ***
[debug] "GET" request for "/" from "127.0.0.1"
...
| /all_posts | 0.000361s |
| /end | 0.002197s |
'----------------------------------------+-----------'
- or download this
$ sqlite3 root/database
SQLite version 3.3.6
...
1|test|a new post|Foo|2007-01-01 00:01
2|another test|another post|Bar|2007-01-01 00:02
sqlite>