Perl催化剂应用修改
所以我试图修改另一个程序员编写的应用程序。该程序是用 Perl 编写的,显然使用了 Catalyst 框架,我对这两个框架都没有任何经验。
代码有很好的文档记录,我的修改看起来非常简单,但是当我尝试更改某些内容(具体来说是在控制器中)时,它不会产生任何效果。我是不是少了一步?我打开文件进行编辑、保存,然后尝试在浏览器中加载 Web 应用程序。我什至删除了其中一个控制器的全部内容,看看它是否会破坏应用程序,但事实并非如此。
请帮忙。
谢谢,
肯
So I am attempting to modify an application written by another programmer. The program is written in Perl and apparently uses the Catalyst framework neither of which I have any experience with.
The code is well documented and my modifications seem pretty straightforward however when I try to change something (in the the controllers to be specific) the same to take no effect. Am I missing a step? I open the file edit it, save it, and try to load the web app in my browser. I've even deleted the entire contents of one of the controllers to see if it would break the application and it did not.
Please Help.
Thanks,
Ken
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果应用程序以合理的方式设置(在模板中使用 uri_for(_action) ,而不是专门依赖服务器/env/等),您应该使用开发服务器进行开发。有些做法可能会使这变得困难:不进行修改就不可能。这就是你应该做的全部 -
除非设置中有一些奇怪的东西,否则你会得到 http://localhost:3000/ 与您的应用程序一起运行。
或者,以 apache 设置中的 Web 用户身份运行应用程序可能是个好主意。如果存在预期供该用户使用的文件或访问权限,则这可能很重要(例如,如果使用会话或缓存文件并将其限制为该用户) -
标志会打开调试输出和重新启动程序,以便每次更改文件时在应用程序中,服务器将自动重新启动(如果可以编译)。
使用 Catalyst 进行开发是一种乐趣,而开发服务器就是其中的一部分。
If the application was set-up in a sane way (using
uri_for(_action)
in templates and not specifically relying on the server/env/etc) you should be developing with the dev server. There are some practices that can make this difficult:impossible without modifications. This is all you should have to do–Unless there is something wonky in the setup, you’ll get http://localhost:3000/ running with your app.
Or, what is probably a good idea, run the application as the webuser in your apache setup. If there are files or access expected to be for that user, it might be important (e.g., if session or cache files are used and restricted to the user)–
The flags turn on debugging output and the restarter so that every time you change files in the application, the server will restart automatically (if it compiles).
Catalyst is a joy to develop with and the dev server is part of why.