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.
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.
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.
Term::ReadKey
Diane Benz <diane@ccgb.umn.edu>
DBD, DBD::Oracle
To install DBIx::OracleLogin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::OracleLogin
CPAN shell
perl -MCPAN -e shell install DBIx::OracleLogin
For more information on module installation, please visit the detailed CPAN module installation guide.