最簡練有效的catalyst的action總結
~zarquon/Catalyst-Manual-5.7013/lib/Catalyst/Manual/Tutorial/Authentication.pod
在上邊的連結裡邊有對catalyst的action最簡練有效的總結,如下:
Note: Catalyst provides a number of different types of actions, such as Local, Regex, Private and the new Path. You should refer to for a more detailed explanation, but the following bullet points provide a quick introduction:
- The majority of application have traditionally used Local actions for items that respond to user requests and Private actions for those that do not directly respond to user input.
- Newer Catalyst applications tend to use Path actions and the Args attribute because of their power and flexibility. You can specify the path to match relative to the namespace of the current module as an argument to Path. For example Path('list') in lib/MyApp/Controller/Books.pm would match on the URL but Path('/list') would match on .
- Automatic "chaining" of actions by the dispatcher is a powerful feature that allows multiple methods to handle a single URL. See for more information on chained actions.
- There are five types of build-in Private actions: begin, end, default, index, and auto.
- With begin, end, default, index private actions, only the most specific action of each type will be called. For example, if you define a begin action in your controller it will override a begin action in your application/root controller -- only the action in your controller will be called.
- Unlike the other actions where only a single method is called for each request, every auto action along the chain of namespaces will be called. Each auto action will be called from the application/root controller down through the most specific class.
By placing the authentication enforcement code inside the auto method of lib/MyApp/Controller/Root.pm (or lib/MyApp.pm), it will be called for every request that is received by the entire application.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/82392/viewspace-467905/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【2024有效】WordPress忘記密碼找回登入密碼的最簡單有效的方法密碼
- 用最簡單的方式訓練史上最強ResNet-50,效能超過魔改結構的ResNeSt
- 正念訓練的有效方法
- Pygame的簡單總結GAM
- 修改SQL Server資料庫表的建立時間最簡單最直接有效的方法SQLServer資料庫
- catalyst支援unicode的重要配置Unicode
- 1.23訓練總結
- 每日一練(36):有效的括號
- 簡簡單單的總結,意如生活的平淡
- HTTP/2 特性的簡單總結HTTP
- HTML簡單知識的總結HTML
- RediSearch的簡單使用與總結Redis
- OSG嵌入QT的簡明總結QT
- 最長有效括號的問題
- 選擇catalyst是正確的麼?
- 關於STL容器的簡單總結
- 每日一練(44):有效的字母異位詞
- 似乎是最實用的hashtable知識總結
- 練習最原始的JDBC的基本操作JDBC
- 初始化ArrayList的簡單方法總結
- 映象安裝pytorch的簡便方法總結PyTorch
- SpringMVC+Spring+Mybatis配置的簡要總結SpringMVCMyBatis
- Perl Catalyst 倒出 ExcelExcel
- OO學習最終總結
- MySQL簡單總結MySql
- vuex簡單總結Vue
- 最長有效括號
- 2024.09.19短時訓練賽總結
- 給你總結幾個ES下最容易踩的坑
- HBase-Region太多的問題簡單總結
- 排程器Quartz的簡述與使用總結quartz
- (13)caffe總結之訓練和測試自己的圖片
- 600 條最強 Linux 命令總結Linux
- ES6新特性總結之let和const--史上最全最簡潔
- 最簡單的物件建立物件
- 最簡明的Shiro教程
- sql注入簡單總結SQL
- 列舉簡單總結