Odoo::Database::Manager
version 0.03
use v5.20; use Odoo::Database::Manager; my $dbman = Odoo::Database::Manager->new( url => 'http://localhost:8069', password => 'manager_admin_password'); say "Current databases:"; say for $dbman->list_databases; say "Creating new database foo:"; $dbman->createdb(dbname => 'foo', lang => 'en_GB', admin_password => 'admin'); say "Dropping foo again:"; $dbman->dropdb('foo');
Create and drop Odoo databases from your Perl scripts
Odoo::Database::Manager - database management for Odoo (EXPERIMENTAL)
EXPERIMENTAL
Return list of Odoo databases.
my @dbs = $dbman->list_databases;
Create a database. No meaningful return value as yet.
$dbman->createdb(dbname => 'my_db', lang => 'en_GB', admin_password => 'password');
Drop the database. No meaningful return value as yet.
$dbman->dropdb('my_db');
Copyright (C) 2016 Nick Booker
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Nicholas Booker <nmb+cpan@nickbooker.uk>
This software is copyright (c) 2016 by Nicholas Booker.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Odoo::Database::Manager, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Odoo::Database::Manager
CPAN shell
perl -MCPAN -e shell install Odoo::Database::Manager
For more information on module installation, please visit the detailed CPAN module installation guide.