The heart of your application lives in the
lib
directory.This directory contains a file called
MyApp.pm
. This file defines the namespace and inheritance that are necessary to make this a Catalyst application. It also contains the list of plugins to load application-specific configurations. These configurations can also be defined in themy
app.conf
file mentioned previously. However, if the same configuration is mentioned in both the files, then the configuration mentioned here takes precedence.Inside the
lib
directory, there are three key directories, namelyMyApp/Controller
,MyApp/Model
, andMyApp/View
. Catalyst loads the Controllers, Models, and Views from these directories respectively.
Right now, there's one Controller called Root.pm
. This will handle all root level (/
) URLs. This is where the code that generates the welcome page is located.
Keep in mind that MyApp
is just like any other namespace of a module. The application is created with whatever you...