NAME

Bryar::DataSource::DBI - Retrieve blog posts and comments from database

SYNOPSIS

  • Create a mysql database called "bryar":

    CREATE TABLE posts (
          id mediumint(8) unsigned NOT NULL auto_increment,
          content text,
          title varchar(255),
          epoch timestamp,
          category varchar(255),
          author varchar(20),
          PRIMARY KEY(id)
    );
    
    CREATE TABLE comments (
          id mediumint(8) unsigned NOT NULL auto_increment,
          document mediumint(8),
          content text,
          epoch timestamp,
          url varchar(255),
          author varchar(20),
          PRIMARY KEY(id)
    );
  • Install Class::DBI::mysql and Class::DBI::AbstractSearch

  • Ensure the web server's database user can read from all tables, and write to the comments table.

  • Put source: Bryar::DataSource::DBI in your Bryar config.

  • Get blogging!