Dave Rolsky > Pg-CLI-0.11 > Pg::CLI::createdb

Download:
Pg-CLI-0.11.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.11   Source  

NAME ^

Pg::CLI::createdb - Wrapper for the createdb utility

VERSION ^

version 0.11

SYNOPSIS ^

  my $createdb = Pg::CLI::createdb->new(
      username => 'foo',
      password => 'bar',
      host     => 'pg.example.com',
      port     => 5433,
  );

  $createdb->run(
      database => 'NewDB',
      options  => [
          '--encoding', 'UTF-8',
          '--owner',    'alice',
      ],
  );

DESCRIPTION ^

This class provides a wrapper for the createdb utility.

METHODS ^

This class provides the following methods:

Pg::CLI::createdb->new( ... )

The constructor accepts a number of parameters:

$createdb->run( database => $db, ... )

This method runs the createdb command with the given options.

This method also accepts optional stdin, stdout, and stderr parameters. These parameters can be any defined value that could be passed as the relevant parameter to IPC::Run3's run3 subroutine.

Most notably, you can pass scalar references to pipe data in via the stdin parameter or capture output sent to stdout or stderr

This method accepts the following arguments:

BUGS ^

See Pg::CLI for bug reporting details.

AUTHOR ^

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2013 by Dave Rolsky.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)
syntax highlighting: