ubuntu系统
1安装:
其他的模块就不多说了
百度搜集来各种安装方法,不管三七二十一先装上
sudo perl -MCPAN -e shell
install Catalyst
install Catalyst::Devel
install Catalyst::View::TT #Template Toolkit模块 之前可能会自动装上
install DBIx::Class
install Catalyst::Model::DBIC::Schema
Catalyst 常用的插件列表(转自)
1 2 3 4 5 6 7 8 | Catalyst::Plugin::Authentication Catalyst::Plugin::Authorization::Roles Catalyst::Plugin::ConfigLoader Catalyst::Plugin::Session Catalyst::Plugin::Session::State::Cookie Catalyst::Plugin::Session::Store::FastMmap Catalyst::Plugin::StackTrace Catalyst::Plugin::Static::Simple |
如果安装过程中出现错误,到~/.cpan/build/找相应的模块编译安装
catalyst.pl myApp
cd myApp
下面是目录结构
- ~/www/myApp$ tree
-
.
-
├── Changes
-
├── lib
-
│?? ├── myApp
-
│?? │?? ├── Controller
-
│?? │?? │?? └── Root.pm
-
│?? │?? ├── Model
-
│?? │?? └── View
-
│?? └── myApp.pm
-
├── Makefile.PL
-
├── myapp.conf
-
├── myapp.psgi
-
├── README
-
├── root
-
│?? ├── favicon.ico
-
│?? └── static
-
│?? └── images
-
│?? ├── btn_120x50_built.png
-
│?? ├── btn_120x50_built_shadow.png
-
│?? ├── btn_120x50_powered.png
-
│?? ├── btn_120x50_powered_shadow.png
-
│?? ├── btn_88x31_built.png
-
│?? ├── btn_88x31_built_shadow.png
-
│?? ├── btn_88x31_powered.png
-
│?? ├── btn_88x31_powered_shadow.png
-
│?? └── catalyst_logo.png
-
├── script
-
│?? ├── myapp_cgi.pl
-
│?? ├── myapp_create.pl
-
│?? ├── myapp_fastcgi.pl
-
│?? ├── myapp_server.pl
-
│?? └── myapp_test.pl
-
└── t
-
├── 01app.t
-
├── 02pod.t
-
└── 03podcoverage.t
-
-
10 directories, 25 files
启动
- script/myapp_server.pl
-
[debug] Debug messages enabled
-
[debug] Statistics enabled
-
[debug] Loaded plugins:
-
.----------------------------------------------------------------------------.
-
| Catalyst::Plugin::ConfigLoader 0.30 |
-
'----------------------------------------------------------------------------'
-
-
[debug] Loaded dispatcher "Catalyst::Dispatcher"
-
[debug] Loaded engine "Catalyst::Engine"
-
[debug] Found home "/var/www/myApp"
-
[debug] Loaded Config "/var/www/myApp/myapp.conf"
-
[debug] Loaded components:
-
.-----------------------------------------------------------------+----------.
-
| Class | Type |
-
+-----------------------------------------------------------------+----------+
-
| myApp::Controller::Root | instance |
-
'-----------------------------------------------------------------+----------'
-
-
[debug] Loaded Private actions:
-
.----------------------+--------------------------------------+--------------.
-
| Private | Class | Method |
-
+----------------------+--------------------------------------+--------------+
-
| /default | myApp::Controller::Root | default |
-
| /end | myApp::Controller::Root | end |
-
| /index | myApp::Controller::Root | index |
-
'----------------------+--------------------------------------+--------------'
-
-
[debug] Loaded Path actions:
-
.-------------------------------------+--------------------------------------.
-
| Path | Private |
-
+-------------------------------------+--------------------------------------+
-
| / | /index |
-
| /... | /default |
-
'-------------------------------------+--------------------------------------'
-
-
[info] myApp powered by Catalyst 5.90007
-
HTTP::Server::PSGI: Accepting connections at http://0:3000/
这时可以在浏览器里输入 就可以看到一个catalyst 的第一个页面了
---------------------------------------------------------------------------------------------------------------------------------
有问题看看手册
208 perldoc Catalyst
209 perldoc Catalyst::Manual
210 perldoc Catalyst::Manual::Intro
未完待续
阅读(774) | 评论(0) | 转发(0) |