The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

version 0.03

SYNOPSIS

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

  $pg_dump->run(
      database => 'database',
      options  => [ '-C' ],
  );

DESCRIPTION

This class provides a wrapper for the pg_dump utility.

METHODS

This class provides the following methods:

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

The constructor accepts a number of parameters:

  • username

    The username to use when connecting to the database. Optional.

  • password

    The password to use when connecting to the database. Optional.

  • host

    The host to use when connecting to the database. Optional.

  • port

    The port to use when connecting to the database. Optional.

$pg_dump->run( database => ..., options => [ ... ] )

This method dumps the specified database. Any values passed in options will be passed on to pg_dump.

BUGS

See Pg::CLI for bug reporting details.

AUTHOR

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

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

This is free software, licensed under:

  The Artistic License 2.0