As you start using the address book, you might want to import and export data in a standard format. You could add a web interface for this functionality, but sometimes it's easier to just write a quick shell script to parse some outside data and enter it into our database. Thanks to the flexibility of Catalyst, scripts running outside of the main application can use the same Model (and even other components, if you can dream up a use for them) as the application and manipulate the database directly.
DBIx::Class schema externally is pretty straightforward. All we need to do is use the
Schema, connect to it, and add the data.
Let's write a script in the
script directory that will accept lines of CSV-formatted ...