The first link on the index page is Look at all people. So let's create an action that will display everyone in our database, along with their addresses (if any). We'll also show links to relevant actions such as "edit name", "add address", and "delete person". The eventual goal is to have a page that looks something similar to the following screenshot:
The page is a little busy, but it conveys all the information that we want to know. (You'll also notice that Catalyst and Perl can handle Unicode data flawlessly.)
The first thing we need to do is to create a Person
Controller for managing people. This Controller will have add, delete, and list actions for each person. (The list action actually shows every person, which is convenient even if the grammar isn't perfect.)
Let us generate a Controller for Person
using the helpers, as follows:
perl script/addressbook_create.pl controller Person
It should look like the following (minus comments):
package AddressBook::Controller::Person...