r14014 - in /trunk/libapache-session-perl: CHANGES META.yml Makefile.PL Session.pm Session/Lock/MySQL.pm Session/Lock/Semaphore.pm debian/changelog t/99semaphore.t

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Sat Feb 2 18:52:21 UTC 2008


Author: gregoa-guest
Date: Sat Feb  2 18:52:21 2008
New Revision: 14014

URL: http://svn.debian.org/wsvn/?sc=1&rev=14014
Log:
New upstream release.

Modified:
    trunk/libapache-session-perl/CHANGES
    trunk/libapache-session-perl/META.yml
    trunk/libapache-session-perl/Makefile.PL
    trunk/libapache-session-perl/Session.pm
    trunk/libapache-session-perl/Session/Lock/MySQL.pm
    trunk/libapache-session-perl/Session/Lock/Semaphore.pm
    trunk/libapache-session-perl/debian/changelog
    trunk/libapache-session-perl/t/99semaphore.t

Modified: trunk/libapache-session-perl/CHANGES
URL: http://svn.debian.org/wsvn/trunk/libapache-session-perl/CHANGES?rev=14014&op=diff
==============================================================================
--- trunk/libapache-session-perl/CHANGES (original)
+++ trunk/libapache-session-perl/CHANGES Sat Feb  2 18:52:21 2008
@@ -2,6 +2,15 @@
 If you use perl older than 5.6 - write to alexchorny[AT]gmail.com
 and tell me what version do you use, why and will you need newer versions
 of Apache::Session.
+
+1.86   2008-02-01 by Alexandr Ciornii
+  - Default number of semaphores for *BSD is 8 in Apache::Session::Lock::Semaphore
+
+1.85_01   2008-01-24 by Alexandr Ciornii
+  - typos corrected (catched by Gerald Fox)
+  - more tests and diag in 99semaphore.t
+  - no warning "disconnect invalidates 2 active statement" in
+    Apache::Session::Lock::MySQL by Tony Cook (RT#32148)
 
 1.85   2007-12-20 by Alexandr Ciornii, Perl 20th birthday version
   - mention Catalyst::Plugin::Session, Session

Modified: trunk/libapache-session-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libapache-session-perl/META.yml?rev=14014&op=diff
==============================================================================
--- trunk/libapache-session-perl/META.yml (original)
+++ trunk/libapache-session-perl/META.yml Sat Feb  2 18:52:21 2008
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Apache-Session
-version:             1.85
+version:             1.86
 abstract:            A persistence framework for session data
 license:             perl
 generated_by:        ExtUtils::MakeMaker version 6.32

Modified: trunk/libapache-session-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libapache-session-perl/Makefile.PL?rev=14014&op=diff
==============================================================================
--- trunk/libapache-session-perl/Makefile.PL (original)
+++ trunk/libapache-session-perl/Makefile.PL Sat Feb  2 18:52:21 2008
@@ -1,4 +1,5 @@
-use 5.002; #Symbol.pm
+use 5.003_07; #earliest version on CPAN
+#Symbol.pm requires 5.002
 use ExtUtils::MakeMaker;
 
 print << 'EOT';
@@ -26,7 +27,7 @@
                      'constant'        => 0, #Available on CPAN now
 #                     'MIME::Base64'    => 0, #new versions require 5.6
 #                     'DB_File'         => 0, #test
-#                     'Digest::MD5'     => 0, #new versions requires 5.6
+#                     'Digest::MD5'     => 0, #new versions require 5.6
                     },
     AUTHOR          => 'Casey West <casey[at]geeknest.com>',
     ABSTRACT        => 'A persistence framework for session data',

Modified: trunk/libapache-session-perl/Session.pm
URL: http://svn.debian.org/wsvn/trunk/libapache-session-perl/Session.pm?rev=14014&op=diff
==============================================================================
--- trunk/libapache-session-perl/Session.pm (original)
+++ trunk/libapache-session-perl/Session.pm Sat Feb  2 18:52:21 2008
@@ -56,7 +56,7 @@
 generated via MD5.  The reader is encouraged to extend these capabilities to
 meet his own requirements.
 
-A derived class of Apache::Session is used to tie together the three
+A derived class of Apache::Session is used to tie together the three following
 components.  The derived class inherits the interface from Apache::Session, and
 specifies which store and locker classes to use.  Apache::Session::MySQL, for
 instance, uses the MySQL storage class and also the MySQL locking class. You
@@ -94,7 +94,7 @@
 =head2 Reading the session ID
 
 The session ID is the only magic entry in the session object,
-but anything beginning with a "_" is considered reserved for
+but anything beginning with an "_" is considered reserved for
 future use.
 
  my $id = $session{_session_id};
@@ -110,7 +110,7 @@
 saves the session to the data store, or calls die() if it cannot.  It
 also obtains an exclusive lock on the session object.  If you retrieve
 an existing session, Session immediately restores the object from storage,
-or calls die() in case of an error.  Session also obtains an non-exclusive
+or calls die() in case of an error.  Session also obtains a non-exclusive
 lock on the session.
 
 As you put data into the session hash, Session squirrels it away for
@@ -168,7 +168,7 @@
 
 When you share data between Apache processes, you need to decide on a
 session ID number ahead of time and make sure that an object with that
-ID number is in your object store before starting you Apache.  How you
+ID number is in your object store before starting your Apache.  How you
 accomplish that is your own business.  I use the session ID "1".  Here
 is a short program in which we use Apache::Session to store out 
 database access information.
@@ -319,7 +319,7 @@
 use strict;
 use vars qw($VERSION);
 
-$VERSION = '1.85';
+$VERSION = '1.86';
 $VERSION = eval $VERSION;
 
 #State constants

Modified: trunk/libapache-session-perl/Session/Lock/MySQL.pm
URL: http://svn.debian.org/wsvn/trunk/libapache-session-perl/Session/Lock/MySQL.pm?rev=14014&op=diff
==============================================================================
--- trunk/libapache-session-perl/Session/Lock/MySQL.pm (original)
+++ trunk/libapache-session-perl/Session/Lock/MySQL.pm Sat Feb  2 18:52:21 2008
@@ -14,7 +14,7 @@
 use DBI;
 use vars qw($VERSION);
 
-$VERSION = '1.00';
+$VERSION = '1.01';
 
 sub new {
     my $class = shift;
@@ -52,6 +52,7 @@
     
     my $sth = $self->{dbh}->prepare_cached(q{SELECT GET_LOCK(?, 3600)}, {}, 1);
     $sth->execute($self->{lockid});
+    $sth->finish();
     
     $self->{lock} = 1;
 }
@@ -68,6 +69,7 @@
         
         my $sth = $self->{dbh}->prepare_cached(q{SELECT RELEASE_LOCK(?)}, {}, 1);
         $sth->execute($self->{lockid});
+        $sth->finish();
         
         $self->{lock} = 0;
     } 
@@ -102,9 +104,9 @@
 =head1 SYNOPSIS
 
  use Apache::Session::Lock::MySQL;
- 
- my $locker = new Apache::Session::Lock::MySQL;
- 
+
+ my $locker = Apache::Session::Lock::MySQL->new();
+
  $locker->acquire_read_lock($ref);
  $locker->acquire_write_lock($ref);
  $locker->release_read_lock($ref);

Modified: trunk/libapache-session-perl/Session/Lock/Semaphore.pm
URL: http://svn.debian.org/wsvn/trunk/libapache-session-perl/Session/Lock/Semaphore.pm?rev=14014&op=diff
==============================================================================
--- trunk/libapache-session-perl/Session/Lock/Semaphore.pm (original)
+++ trunk/libapache-session-perl/Session/Lock/Semaphore.pm Sat Feb  2 18:52:21 2008
@@ -15,15 +15,16 @@
 use IPC::Semaphore;
 use vars qw($VERSION);
 
-$VERSION = '1.02_01';
+$VERSION = '1.04';
 
 BEGIN {
 
     if ($Config{'osname'} eq 'linux') {
         #More semaphores on Linux means less lock contention
         $Apache::Session::Lock::Semaphore::nsems = 32;
-    }
-    else {
+    } elsif ($Config{'osname'}=~/bsd/i) {
+        $Apache::Session::Lock::Semaphore::nsems = 8; #copied from IPC::Semaphore/sem.t minus 1
+    } else {
         $Apache::Session::Lock::Semaphore::nsems = 16;
     }
     

Modified: trunk/libapache-session-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libapache-session-perl/debian/changelog?rev=14014&op=diff
==============================================================================
--- trunk/libapache-session-perl/debian/changelog (original)
+++ trunk/libapache-session-perl/debian/changelog Sat Feb  2 18:52:21 2008
@@ -1,8 +1,9 @@
-libapache-session-perl (1.85-2) UNRELEASED; urgency=low
+libapache-session-perl (1.86-1) UNRELEASED; urgency=low
 
+  * New upstream release.
   * debian/rules: delete /usr/lib/perl5 only if it exists.
 
- -- gregor herrmann <gregor+debian at comodo.priv.at>  Wed, 09 Jan 2008 21:16:37 +0100
+ -- gregor herrmann <gregor+debian at comodo.priv.at>  Sat, 02 Feb 2008 19:51:11 +0100
 
 libapache-session-perl (1.85-1) unstable; urgency=low
 

Modified: trunk/libapache-session-perl/t/99semaphore.t
URL: http://svn.debian.org/wsvn/trunk/libapache-session-perl/t/99semaphore.t?rev=14014&op=diff
==============================================================================
--- trunk/libapache-session-perl/t/99semaphore.t (original)
+++ trunk/libapache-session-perl/t/99semaphore.t Sat Feb  2 18:52:21 2008
@@ -1,7 +1,7 @@
 use Test::More;
 use Test::Exception;
 use File::Temp qw[tempdir];
-use Cwd qw[getcwd];
+#use Cwd qw[getcwd];
 use Config;
 
 BEGIN {
@@ -17,7 +17,7 @@
   if $^O eq 'cygwin' && (!exists $ENV{'CYGWIN'} || $ENV{'CYGWIN'} !~ /server/i);
 }
 
-plan tests => 29;
+plan tests => 33;
 
 my $package = 'Apache::Session::Lock::Semaphore';
 use_ok $package;
@@ -28,6 +28,7 @@
 
 use IPC::SysV qw(IPC_CREAT S_IRWXU SEM_UNDO);
 use IPC::Semaphore;
+diag("IPC::Semaphore version $IPC::Semaphore::VERSION");
 
 my $semkey = int(rand(2**15-1));
 
@@ -45,6 +46,7 @@
 
     $locker->acquire_read_lock($session);
     my $semnum = $locker->{read_sem};
+    ok(defined($semnum),'$locker->{read_sem} is defined');
 
     my $sem = IPC::Semaphore->new($semkey, $number++, S_IRWXU);
 




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