r21949 - in /trunk/libuser-simple-perl: Changes META.yml debian/changelog lib/User/Simple.pm lib/User/Simple/Admin.pm t/User-Simple.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Fri Jun 20 11:31:47 UTC 2008


Author: gregoa
Date: Fri Jun 20 11:31:47 2008
New Revision: 21949

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=21949
Log:
New upstream release.

Modified:
    trunk/libuser-simple-perl/Changes
    trunk/libuser-simple-perl/META.yml
    trunk/libuser-simple-perl/debian/changelog
    trunk/libuser-simple-perl/lib/User/Simple.pm
    trunk/libuser-simple-perl/lib/User/Simple/Admin.pm
    trunk/libuser-simple-perl/t/User-Simple.t

Modified: trunk/libuser-simple-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuser-simple-perl/Changes?rev=21949&op=diff
==============================================================================
--- trunk/libuser-simple-perl/Changes (original)
+++ trunk/libuser-simple-perl/Changes Fri Jun 20 11:31:47 2008
@@ -1,4 +1,9 @@
 Revision history for Perl extension User::Simple.
+
+1.36 Sun Jun 15 23:56:56 CDT 2008
+        - Umh... since the very early revisions (0.9?), I was only
+	  explicitly skipping 14 tests if DBD::XBase is not
+	  installed. Updating it to 37. Grr.
 
 1.35
         - Gah... Using DBD::XBase in the tests lets many subtle

Modified: trunk/libuser-simple-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuser-simple-perl/META.yml?rev=21949&op=diff
==============================================================================
--- trunk/libuser-simple-perl/META.yml (original)
+++ trunk/libuser-simple-perl/META.yml Fri Jun 20 11:31:47 2008
@@ -1,13 +1,16 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         User-Simple
-version:      1.35
-version_from: lib/User/Simple.pm
-installdirs:  site
-requires:
+--- #YAML:1.0
+name:                User-Simple
+version:             1.36
+abstract:            Simple user sessions management
+license:             ~
+author:              
+    - Gunnar Wolf <gwolf@>
+generated_by:        ExtUtils::MakeMaker version 6.42
+distribution_type:   module
+requires:     
     Date::Calc:                    0
     DBI:                           0
     Digest::MD5:                   0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+meta-spec:
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Modified: trunk/libuser-simple-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuser-simple-perl/debian/changelog?rev=21949&op=diff
==============================================================================
--- trunk/libuser-simple-perl/debian/changelog (original)
+++ trunk/libuser-simple-perl/debian/changelog Fri Jun 20 11:31:47 2008
@@ -1,3 +1,9 @@
+libuser-simple-perl (1.36-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Fri, 20 Jun 2008 13:30:23 +0200
+
 libuser-simple-perl (1.35-3) unstable; urgency=low
 
   [ Damyan Ivanov ]

Modified: trunk/libuser-simple-perl/lib/User/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuser-simple-perl/lib/User/Simple.pm?rev=21949&op=diff
==============================================================================
--- trunk/libuser-simple-perl/lib/User/Simple.pm (original)
+++ trunk/libuser-simple-perl/lib/User/Simple.pm Fri Jun 20 11:31:47 2008
@@ -169,7 +169,7 @@
 use UNIVERSAL qw(isa);
 
 our $AUTOLOAD;
-our $VERSION = '1.35';
+our $VERSION = '1.36';
 
 ######################################################################
 # Constructor/destructor

Modified: trunk/libuser-simple-perl/lib/User/Simple/Admin.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuser-simple-perl/lib/User/Simple/Admin.pm?rev=21949&op=diff
==============================================================================
--- trunk/libuser-simple-perl/lib/User/Simple/Admin.pm (original)
+++ trunk/libuser-simple-perl/lib/User/Simple/Admin.pm Fri Jun 20 11:31:47 2008
@@ -22,10 +22,11 @@
   $id = $ua->id($login);
   $login = $ua->login($id);
 
-  $otherattrib = $user->otherattrib;
+  $otherattrib = $user->otherattrib($id);
 
   $ok = $usr->set_login($id, $login);
   $ok = $usr->set_passwd($id, $passwd);
+  $ok = $usr->set_otherattrib($id, $value);
   $ok = $usr->clear_session($id);
 
   $id = $ua->new_user(login => $login, passwd => $passwd, 
@@ -166,7 +167,7 @@
 Just as with the accessors, if you have extra columns, you can modify them the
 same way:
 
-  $ok = $usr->set_otherattrib($id);
+  $ok = $usr->set_otherattrib($id, $value);
 
 i.e.
 
@@ -379,14 +380,19 @@
 # We need only the mutators for the special case fields - Handle everything
 # else via AUTOLOAD
 sub set_login { 
-    my ($self, $id, $new, $sth, $ret);
+    my ($self, $id, $new, $sth, $ret, $used);
     $self = shift;
     $id = shift;
     $new = shift;
 
     return undef unless $id;
 
-    if (my $used = $self->id($new)) {
+    # Setting the login to the current login? Noop doomed to fail, make it look
+    # as a success
+    $used = $self->id($new);
+    return 1 if $used and $used == $self->id($self->login($id));
+
+    if ($used) {
 	carp "The requested login is already used (ID $used).";
 	return undef;
     }

Modified: trunk/libuser-simple-perl/t/User-Simple.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libuser-simple-perl/t/User-Simple.t?rev=21949&op=diff
==============================================================================
--- trunk/libuser-simple-perl/t/User-Simple.t (original)
+++ trunk/libuser-simple-perl/t/User-Simple.t Fri Jun 20 11:31:47 2008
@@ -3,9 +3,8 @@
 
 use strict;
 use DBI;
-use File::Temp qw(tempdir);
-use lib qw(/home/gwolf/User-Simple/lib);
-my ($db, $dbdir);
+use File::Temp;
+my ($db, $tmp_fh);
 
 #########################
 
@@ -19,13 +18,13 @@
 # Insert your test code below, the Test::More module is use()ed here so read
 # its man page ( perldoc Test::More ) for help writing this test script.
 
-$dbdir = tempdir (CLEANUP => 1); # CLEANUP removes directory upon exiting
-eval { $db = DBI->connect("DBI:XBase:$dbdir") };
+$tmp_fh = File::Temp->new(TEMPLATE => 'User-Simple-build-XXXXXX');
+eval { $db = DBI->connect('DBI:SQLite:dbname=' .$tmp_fh->filename) };
 
 SKIP: {
     my ($ua, $adm_id, $usr_id, $usr, $session, %users);
     skip 'Not executing the complete tests: Database handler not created ' .
-	'(I need DBD::XBase for this)', 14 unless $db;
+	'(I need DBD::SQLite for this)', 37 unless $db;
 
     ###
     ### First, the User::Simple::Admin tests...




More information about the Pkg-perl-cvs-commits mailing list