Hailo::Storage::PostgreSQL - A storage backend for Hailo using DBD::Pg
First create a PostgreSQL database for failo:
# Run it as a dedicated hailo user createdb -E UTF8 -O hailo hailo # Just create database.. createdb -E UTF8 hailo
As a module:
my $hailo = Hailo->new( storage_class => 'Pg', storage_args => { dbname => 'hailo', }, ); $hailo->train("hailo.trn");
Or with complex connection options:
my $hailo = Hailo->new( storage_class => 'Pg', storage_args => { dbname => 'hailo', host => 'localhost', port => '5432', options => '...', username => 'hailo', password => 'hailo' }, ); $hailo->train("hailo.trn");
From the command line:
hailo --train hailo.trn \ --storage Pg \ --storage-args dbname=hailo
hailo --train hailo.trn \ --storage Pg \ --storage-args dbname=hailo \ --storage-args host=localhost \ --storage-args port=5432 \ --storage-args options=... \ --storage-args username=hailo \ --storage-args password=hailo
Almost all of these options can be omitted, see DBD::Pg's documentation for the default values.
See Hailo's documentation for other non-Pg specific options.
This backend maintains information in a PostgreSQL database.
storage_args
This is a hash reference which can have the following keys:
'dbname', the name of the database to use (required).
'host', the host to connect to (required).
'port', the port to connect to (required).
'options', additional options to pass to PostgreSQL.
'username', the username to use.
'password', the password to use.
Ævar Arnfjörð Bjarmason <avar@cpan.org>
Copyright 2010 Ævar Arnfjörð Bjarmason.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Hailo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hailo
CPAN shell
perl -MCPAN -e shell install Hailo
For more information on module installation, please visit the detailed CPAN module installation guide.