An open API service indexing awesome lists of open source software.

https://github.com/davorg/book-demo-app


https://github.com/davorg/book-demo-app

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

This is a simple demonstation of using a database with Perl. It was written
for a tutorial on Modern Perl in Linux Format issue 151.

* book.sql - SQL to create the ncessary database tables and user
* Book.pm - Main database communication module
* Book/ - Directory containing other database communication modules
* book - The command line program itself

The database communication modules were generated automatically using this
command:

$ dbicdump -o components='["InflateColumn::DateTime"]' \
Book dbi:mysql:database=books books README

The 'book' command is used as follows:

$ book [list]
- Shows all books currently in the database

$ book add
- Adds the given book to the system

$ book start
- Tells the system that you have started reading the given book

$ book end
- Tells the system that you have finished reading the given book