3

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

KTastrophy
  • 1,739
  • 15
  • 23

1 Answers1

8

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–

cd {APPLICATION DIRECTORY}
# Read about it-
perldoc script/*_server.pl
# Run it-
script/*_server.pl -r -d

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)–

sudo -u www script/*_server.pl -r -d

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.

Ashley
  • 4,307
  • 2
  • 19
  • 28
  • 3
    yep, it sounds like you're not using the dev server. Which is a route to insanity. Spend a couple of hours on Catalyst::Manual::Tutorial please. – singingfish Mar 26 '11 at 08:36