NAME

DBIx::OracleLogin - takes a string and splits out individual login information (user id, Oracle sid, and password) to be used in a DBI->connect() statement when connecting to an Oracle database.

SYNOPSIS

  use DBIx::OracleLogin;
  my ( $user, $pass, $sid ) = DBIx::OracleLogin::parse($text);

$text should be of the standard form used by Oracle applications such as sqlplus: userid@oracle_sid/password or userid/password@oracle_sid or userid@oracle_sid or userid/password or user.

A password does not need to be provided in the $text argument. If no password is provided then the program prompts for a password.

A oracle_sid does not need to be provided in the $text argument. If no oracle_sid is provided then the program attempts to retrieve a default from $ENV{ORACLE_SID} environment variable.

If the $text format is invalid the program will return null values for $user, $sid and $pass.

DESCRIPTION

This module is useful to avoid hard-coding of Oracle database login information in a Perl program.

The $text argument provided to the method parse() should be of one of these forms: userid@oracle_sid/password or userid/password@oracle_sid or userid@oracle_sid or userid/password or userid.

A password does not need to be provided in the $text argument. If no password is provided then the program prompts for a password without echoing to stdout.

A oracle_sid does not need to be provided in the $text argument. If no oracle_sid is provided then the program attempts to retrieve a default from $ENV{ORACLE_SID} environment variable.

If the $text format is invalid the program will return null values for $user, $sid and $pass.

REQUIRES

Term::ReadKey

AUTHOR

Diane Benz <diane@ccgb.umn.edu>

SEE ALSO

DBD, DBD::Oracle