r35074 - in /branches/upstream/libdbix-password-perl/current: Changes MANIFEST META.yml Makefile.PL Password.pm Password.pm-orig README VERSION
roam-guest at users.alioth.debian.org
roam-guest at users.alioth.debian.org
Sat May 9 12:24:51 UTC 2009
Author: roam-guest
Date: Sat May 9 12:24:46 2009
New Revision: 35074
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35074
Log:
[svn-upgrade] Integrating new upstream version, libdbix-password-perl (1.9)
Added:
branches/upstream/libdbix-password-perl/current/META.yml
Modified:
branches/upstream/libdbix-password-perl/current/Changes
branches/upstream/libdbix-password-perl/current/MANIFEST
branches/upstream/libdbix-password-perl/current/Makefile.PL
branches/upstream/libdbix-password-perl/current/Password.pm
branches/upstream/libdbix-password-perl/current/Password.pm-orig
branches/upstream/libdbix-password-perl/current/README
branches/upstream/libdbix-password-perl/current/VERSION
Modified: branches/upstream/libdbix-password-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbix-password-perl/current/Changes?rev=35074&op=diff
==============================================================================
--- branches/upstream/libdbix-password-perl/current/Changes (original)
+++ branches/upstream/libdbix-password-perl/current/Changes Sat May 9 12:24:46 2009
@@ -1,4 +1,10 @@
Revision history for Perl extension DBIx::Password.
+
+1.9 Fri May 16 15:02:12 PDT 2008
+ - Added getVirtualUser for Jamie
+
+1.8 Tue Dec 19 15:29:39 PST 2006
+ - Added more undef around failures for connections
1.7 Wed Dec 20 13:45:29 PST 2000
-Returns undef if DBI connect fails (never has
Modified: branches/upstream/libdbix-password-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbix-password-perl/current/MANIFEST?rev=35074&op=diff
==============================================================================
--- branches/upstream/libdbix-password-perl/current/MANIFEST (original)
+++ branches/upstream/libdbix-password-perl/current/MANIFEST Sat May 9 12:24:46 2009
@@ -7,3 +7,4 @@
LICENSE
README
VERSION
+META.yml Module meta-data (added by MakeMaker)
Added: branches/upstream/libdbix-password-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbix-password-perl/current/META.yml?rev=35074&op=file
==============================================================================
--- branches/upstream/libdbix-password-perl/current/META.yml (added)
+++ branches/upstream/libdbix-password-perl/current/META.yml Sat May 9 12:24:46 2009
@@ -1,0 +1,10 @@
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: DBIx-Password
+version: 1.9
+version_from:
+installdirs: site
+requires:
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30
Modified: branches/upstream/libdbix-password-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbix-password-perl/current/Makefile.PL?rev=35074&op=diff
==============================================================================
--- branches/upstream/libdbix-password-perl/current/Makefile.PL (original)
+++ branches/upstream/libdbix-password-perl/current/Makefile.PL Sat May 9 12:24:46 2009
@@ -150,12 +150,7 @@
my $database = getLine();
print "What is the name of the machine that the database is on?\n";
my $hostname = getLine();
- my $connect;
- if ($hostname) {
- $connect = "DBI:$driver:dbname=$database;host=$hostname";
- } else {
- $connect = "DBI:$driver:dbname=$database";
- }
+ my $connect = "DBI:$driver:dbname=$database;host=$hostname";
print "Is the database on any special port(you should probably just hit return)?\n";
my $port = getLine();
$connect .= ";port=$port" if $port;
Modified: branches/upstream/libdbix-password-perl/current/Password.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbix-password-perl/current/Password.pm?rev=35074&op=diff
==============================================================================
--- branches/upstream/libdbix-password-perl/current/Password.pm (original)
+++ branches/upstream/libdbix-password-perl/current/Password.pm Sat May 9 12:24:46 2009
@@ -3,20 +3,9 @@
use DBI();
@DBIx::Password::ISA = qw ( DBI::db );
-($DBIx::Password::VERSION) = ' $Revision: 1.8 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($DBIx::Password::VERSION) = ' $Revision: 1.9 $ ' =~ /\$Revision:\s+([^\s]+)/;
-my $virtual1 = {
- 'slash' => {
- 'username' => '',
- 'password' => '',
- 'port' => '',
- 'database' => 'sdf',
- 'attributes' => {},
- 'connect' => 'DBI:mysql:database=sdf;host=asf',
- 'driver' => 'mysql',
- 'host' => 'asf'
- }
- };
+my $virtual1 = {};
my %driver_cache;
@@ -26,13 +15,15 @@
return undef unless $virtual1->{$user};
my $self;
my $virtual = $virtual1->{$user};
- return unless $virtual;
+ return undef unless $virtual;
$self = DBI->connect($virtual->{connect}
, $virtual->{'username'}
, $virtual->{'password'}
, $virtual->{'attributes'}
);
+ return undef unless $self;
+
bless $self, $class;
$driver_cache{$self} = $user;
return $self;
@@ -43,13 +34,15 @@
return undef unless $virtual1->{$user};
my $self;
my $virtual = $virtual1->{$user};
+ return undef unless $virtual;
$self = DBI->connect_cached($virtual->{connect}
, $virtual->{'username'}
, $virtual->{'password'}
, $virtual->{'attributes'}
);
- return unless $self;
+ return undef unless $self;
+
bless $self, $class;
$driver_cache{$self} = $user;
return $self;
@@ -69,15 +62,17 @@
sub checkVirtualUser {
my ($user) = @_;
- return 1
- if $virtual1->{$user};
+ return $virtual1->{$user} ? 1 : 0;
+}
- return 0;
+sub getVirtualUser {
+ my ($user) = @_;
+ return $virtual1->{$user} || undef;
}
sub DESTROY {
- my ($self) = @_;
- $self->SUPER::DESTROY;
+ my ($self) = @_;
+ $self->SUPER::DESTROY;
}
1;
@@ -148,7 +143,7 @@
=head1 HOME
-To find out more information look at: http://software.tangent.org/projects.pl?view=DBIxPassword
+To find out more information look at: http://www.tangent.org/DBIx-Password/
=head1 AUTHOR
Modified: branches/upstream/libdbix-password-perl/current/Password.pm-orig
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbix-password-perl/current/Password.pm-orig?rev=35074&op=diff
==============================================================================
--- branches/upstream/libdbix-password-perl/current/Password.pm-orig (original)
+++ branches/upstream/libdbix-password-perl/current/Password.pm-orig Sat May 9 12:24:46 2009
@@ -3,7 +3,7 @@
use DBI();
@DBIx::Password::ISA = qw ( DBI::db );
-($DBIx::Password::VERSION) = ' $Revision: 1.8 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($DBIx::Password::VERSION) = ' $Revision: 1.9 $ ' =~ /\$Revision:\s+([^\s]+)/;
#PASSWORD_INSERT
@@ -14,13 +14,15 @@
return undef unless $virtual1->{$user};
my $self;
my $virtual = $virtual1->{$user};
- return unless $virtual;
+ return undef unless $virtual;
$self = DBI->connect($virtual->{connect}
, $virtual->{'username'}
, $virtual->{'password'}
, $virtual->{'attributes'}
);
+ return undef unless $self;
+
bless $self, $class;
$driver_cache{$self} = $user;
return $self;
@@ -31,13 +33,15 @@
return undef unless $virtual1->{$user};
my $self;
my $virtual = $virtual1->{$user};
+ return undef unless $virtual;
$self = DBI->connect_cached($virtual->{connect}
, $virtual->{'username'}
, $virtual->{'password'}
, $virtual->{'attributes'}
);
- return unless $self;
+ return undef unless $self;
+
bless $self, $class;
$driver_cache{$self} = $user;
return $self;
@@ -57,15 +61,17 @@
sub checkVirtualUser {
my ($user) = @_;
- return 1
- if $virtual1->{$user};
+ return $virtual1->{$user} ? 1 : 0;
+}
- return 0;
+sub getVirtualUser {
+ my ($user) = @_;
+ return $virtual1->{$user} || undef;
}
sub DESTROY {
- my ($self) = @_;
- $self->SUPER::DESTROY;
+ my ($self) = @_;
+ $self->SUPER::DESTROY;
}
1;
@@ -136,7 +142,7 @@
=head1 HOME
-To find out more information look at: http://software.tangent.org/projects.pl?view=DBIxPassword
+To find out more information look at: http://www.tangent.org/DBIx-Password/
=head1 AUTHOR
Modified: branches/upstream/libdbix-password-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbix-password-perl/current/README?rev=35074&op=diff
==============================================================================
--- branches/upstream/libdbix-password-perl/current/README (original)
+++ branches/upstream/libdbix-password-perl/current/README Sat May 9 12:24:46 2009
@@ -59,7 +59,7 @@
HOME
To find out more information look at:
- http://software.tangent.org/projects.pl?view=DBIxPassword
+ http://www.tangent.org/DBIx-Password/
AUTHOR
Brian Aker, brian at tangent.org
Modified: branches/upstream/libdbix-password-perl/current/VERSION
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbix-password-perl/current/VERSION?rev=35074&op=diff
==============================================================================
--- branches/upstream/libdbix-password-perl/current/VERSION (original)
+++ branches/upstream/libdbix-password-perl/current/VERSION Sat May 9 12:24:46 2009
@@ -1,1 +1,1 @@
-1.8
+1.9
More information about the Pkg-perl-cvs-commits
mailing list