---
name: "DBIx::DataSource"
section: "3pm"
platform: "linux"
package: "libdbix-datasource-perl"
version: "0.02-6"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/DBIx::DataSource"
---

# DBIx::DataSource(3pm)

Database-independant create and drop functions

## NAME

DBIx::DataSource - Database-independant create and drop functions

## SYNOPSIS

```
  use DBIx::DataSource qw( create_database drop_database );
  create_database( $data_source, $username, $password )
    or warn $DBIx::DataSource::errstr;
  drop_database( $data_source, $username, $password )
    or warn $DBIx::DataSource::errstr;
```

## DESCRIPTION

This module implements create\_database and drop\_database functions for databases.  It aims to provide a common interface to database creation and deletion regardless of the actual database being used.

Currently supported databases are MySQL and PostgreSQL.  Assistance adding support for other databases is welcomed and relatively simple - see DBIx::DataSource::Driver.

## FUNCTIONS

- create\_database DATA\_SOURCE USERNAME PASSWORD

  Create the database specified by the given DBI data source.

- drop\_database DATA\_SOURCE

  Drop the database specified by the given DBI data source.

## AUTHOR

Ivan Kohler \<ivan-dbix-datasource@420.am\>

## COPYRIGHT

Copyright (c) 2000 Ivan Kohler Copyright (c) 2000 Mail Abuse Prevention System LLC All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

## BUGS

If DBI data sources were objects, these functions would be methods.

## SEE ALSO

DBIx::DataSource::Driver, DBIx::DataSource::mysql, DBIx::DataSource::Pg, DBI
