NAME
Infobot - Developer's Overview
SYNOPSIS
This document provides an overview for a developer interested in getting involved with Infobot development. It describes the main application startup process, and considerations that apply to the application as a whole.
INFOBOT.PM
The application is started by calling Infobot's start
method with a filename relating to a config file. The config file essentially lists which plugins should be loaded, and any configuration options for them.
Loading process
Several steps are taken loading a plugin. The process is slightly different depending on the plugin class (log
, database
, conduit
, datasource
, query
), but basically consists of:
require
We attempt to load the class in to perl
using UNIVERSAL::require - it's very similar to the process of saying use Infobot::YourModule
- we throw a fatal error if the module can't be loaded in this way.
load
BASE CLASSES AND CLASS LAYOUT
Every class in the application should inherit from Infobot::Base, which provides some useful tools.
load
Every class which is loaded via the configuration file (which is probably any class you're likely to write) will be tested to see if it can be included - the result of load
new
So that any errors or issues can be related to a specific object, the object instantiator is intended to be as lightweight as possible. Infobot::Base provides a very lightweight instantiator, which you really don't need to override - any setup should be done in init
, which brings us to...
init
init
is where object setup which might normally be placed
Plugin division How logging work How the pipeline works How the config works How POE fites in