[Jifty-commit] r5015 - in Jifty-DBI/branches/tisql: lib/Jifty/DBI
Jifty commits
jifty-commit at lists.jifty.org
Tue Feb 5 21:15:52 EST 2008
Author: ruz
Date: Tue Feb 5 21:15:52 2008
New Revision: 5015
Modified:
Jifty-DBI/branches/tisql/ (props changed)
Jifty-DBI/branches/tisql/lib/Jifty/DBI/Handle.pm
Log:
r4562 at cubic-pc (orig r4561): jasonmay | 2007-11-29 03:42:49 +0300
Exclude user and passowrd from the DSN so it doesn't show up in the terminal
Modified: Jifty-DBI/branches/tisql/lib/Jifty/DBI/Handle.pm
==============================================================================
--- Jifty-DBI/branches/tisql/lib/Jifty/DBI/Handle.pm (original)
+++ Jifty-DBI/branches/tisql/lib/Jifty/DBI/Handle.pm Tue Feb 5 21:15:52 2008
@@ -194,9 +194,12 @@
my $driver = delete $args{'driver'};
$args{'dbname'} ||= delete $args{'database'};
+ my %exclusions = map { $_ => delete $args{$_} } qw/user password/;
+
$self->{'dsn'} = "dbi:$driver:"
. CORE::join( ';',
map { $_ . "=" . $args{$_} } grep { defined $args{$_} } keys %args );
+ %args = (%args, %exclusions);
}
=head2 dsn
More information about the Jifty-commit
mailing list