https://github.com/davorg/book-demo-app
https://github.com/davorg/book-demo-app
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/davorg/book-demo-app
- Owner: davorg
- Created: 2011-09-03T11:33:16.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2015-04-11T18:28:44.000Z (about 11 years ago)
- Last Synced: 2025-04-02T01:46:37.194Z (about 1 year ago)
- Language: Perl
- Homepage:
- Size: 1.37 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
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