Hello community,
here is the log from the commit of package perl-Apache-Session for
openSUSE:Factory checked in at 2013-06-06 12:18:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Apache-Session (Old)
and /work/SRC/openSUSE:Factory/.perl-Apache-Session.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Apache-Session"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Apache-Session/perl-Apache-Session.changes
2011-11-21 12:35:53.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Apache-Session.new/perl-Apache-Session.changes
2013-06-06 12:18:50.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Jun 3 11:27:29 UTC 2013 - [email protected]
+
+- updated to 1.90
+ - Allow specifying table for Oracle
+ - Use Test::Database for tests
+
+-------------------------------------------------------------------
Old:
----
Apache-Session-1.89.tar.gz
New:
----
Apache-Session-1.90.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Apache-Session.spec ++++++
--- /var/tmp/diff_new_pack.HDzJoD/_old 2013-06-06 12:18:51.000000000 +0200
+++ /var/tmp/diff_new_pack.HDzJoD/_new 2013-06-06 12:18:51.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Apache-Session
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,25 +15,30 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-
Name: perl-Apache-Session
-BuildRequires: apache2-devel apache2-mod_perl dos2unix libapr-util1-devel
pcre-devel perl-DBI
+BuildRequires: apache2-devel
+BuildRequires: apache2-mod_perl
+BuildRequires: dos2unix
+BuildRequires: libapr-util1-devel
+BuildRequires: pcre-devel
+BuildRequires: perl-DBI
BuildRequires: perl-macros
-Version: 1.89
-Release: 3
+Version: 1.90
+Release: 0
Provides: Apache-Session
Requires: apache2
-Requires: apache2-mod_perl perl-URI perl-DBI
+Requires: apache2-mod_perl
+Requires: perl-DBI
+Requires: perl-URI
Conflicts: perlmod
-AutoReqProv: on
-Group: Development/Libraries/Perl
-License: Artistic-1.0
Url: http://cpan.org/modules/by-module/Apache/
Source: Apache-Session-%{version}.tar.gz
Summary: persistent storage for arbitrary data
+License: Artistic-1.0
+Group: Development/Libraries/Perl
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+#BuildRequires: perl(Test::Database)
%{perl_requires}
%description
@@ -42,12 +47,6 @@
store are abstracted to make all backing stores behave alike. The
programmer simply interacts with a tied hash.
-
-
-Authors:
---------
- Jeffrey William Baker <[email protected]>
-
%prep
%setup -q -n Apache-Session-%{version}
dos2unix INSTALL CHANGES TODO README eg/example.perl
@@ -65,9 +64,6 @@
make DESTDIR=$RPM_BUILD_ROOT install_vendor
%perl_process_packlist
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
%defattr(-, root, root)
%doc INSTALL README TODO CHANGES README eg
++++++ Apache-Session-1.89.tar.gz -> Apache-Session-1.90.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/Build.PL
new/Apache-Session-1.90/Build.PL
--- old/Apache-Session-1.89/Build.PL 2010-09-22 00:42:26.000000000 +0200
+++ new/Apache-Session-1.90/Build.PL 2012-12-24 22:50:55.000000000 +0100
@@ -25,7 +25,8 @@
'build_requires' => {
'Test::More' => '0.47',
'Test::Exception' => '0.15',
- 'Test::Deep' => '0.082'
+ 'Test::Deep' => '0.082',
+ ($ENV{TRAVIS}?('Test::Database'=>0, 'DBD::mysql'=>0, 'DBD::Pg' => 0,):()),
},
'dist_author' => 'Casey West <casey[at]geeknest.com>',
'module_name' => 'Apache::Session',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/CHANGES
new/Apache-Session-1.90/CHANGES
--- old/Apache-Session-1.89/CHANGES 2010-09-22 00:52:54.000000000 +0200
+++ new/Apache-Session-1.90/CHANGES 2013-01-27 14:26:32.000000000 +0100
@@ -3,6 +3,10 @@
and tell me what version do you use, why and will you need newer versions
of Apache::Session.
+1.90 2013-01-27 by Alexandr Ciornii, Perl 25th birthday version
+ - Allow specifying table for Oracle
+ - Use Test::Database for tests
+
1.89 2010-09-22 by Alexandr Ciornii
- require Digest::MD5
- all semaphore tests were removed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/Contributing.txt
new/Apache-Session-1.90/Contributing.txt
--- old/Apache-Session-1.89/Contributing.txt 2009-09-15 23:08:50.000000000
+0200
+++ new/Apache-Session-1.90/Contributing.txt 2013-01-27 14:25:45.000000000
+0100
@@ -1,6 +1,6 @@
If you want better support for older Perls, use CPAN::Reporter (Test::Reporter
for CPANPLUS).
Also you can run cpan smoking. That way module can be fixed even before
-you'll find that you need it. See CPAN::YACSmoke.
+you'll find that you need it. See CPAN::Reporter::Smoker.
Generally, you should use Test::Reporter - it's the only way to measure
popularity
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/MANIFEST
new/Apache-Session-1.90/MANIFEST
--- old/Apache-Session-1.89/MANIFEST 2010-09-21 03:39:44.000000000 +0200
+++ new/Apache-Session-1.90/MANIFEST 2013-01-27 14:33:49.000000000 +0100
@@ -20,6 +20,7 @@
lib/Apache/Session/Lock/Semaphore.pm
lib/Apache/Session/Lock/Sybase.pm
lib/Apache/Session/MySQL.pm
+lib/Apache/Session/MySQL/NoLock.pm
lib/Apache/Session/Oracle.pm
lib/Apache/Session/Postgres.pm
lib/Apache/Session/Serialize/Base64.pm
@@ -64,3 +65,4 @@
t/99storable.t
t/99uue.t
t/pod.t
+META.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/META.json
new/Apache-Session-1.90/META.json
--- old/Apache-Session-1.89/META.json 1970-01-01 01:00:00.000000000 +0100
+++ new/Apache-Session-1.90/META.json 2013-01-27 14:34:41.000000000 +0100
@@ -0,0 +1,172 @@
+{
+ "abstract" : "A persistence framework for session data",
+ "author" : [
+ "Casey West <casey[at]geeknest.com>"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter
version 2.112150",
+ "keywords" : [
+ "CGI",
+ "session",
+ "web"
+ ],
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Apache-Session",
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "Test::Deep" : "0.082",
+ "Test::Exception" : "0.15",
+ "Test::More" : "0.47"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Digest::MD5" : 0,
+ "File::Temp" : 0,
+ "IO::File" : 0,
+ "Storable" : "0.6",
+ "constant" : 0,
+ "perl" : "5.005"
+ }
+ }
+ },
+ "provides" : {
+ "Apache::Session" : {
+ "file" : "lib/Apache/Session.pm",
+ "version" : "1.90"
+ },
+ "Apache::Session::DB_File" : {
+ "file" : "lib/Apache/Session/DB_File.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::File" : {
+ "file" : "lib/Apache/Session/File.pm",
+ "version" : "1.54"
+ },
+ "Apache::Session::Flex" : {
+ "file" : "lib/Apache/Session/Flex.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Generate::MD5" : {
+ "file" : "lib/Apache/Session/Generate/MD5.pm",
+ "version" : "2.12"
+ },
+ "Apache::Session::Generate::ModUniqueId" : {
+ "file" : "lib/Apache/Session/Generate/ModUniqueId.pm",
+ "version" : "0.02"
+ },
+ "Apache::Session::Generate::ModUsertrack" : {
+ "file" : "lib/Apache/Session/Generate/ModUsertrack.pm",
+ "version" : "0.02"
+ },
+ "Apache::Session::Informix" : {
+ "file" : "lib/Apache/Session/Informix.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Lock::File" : {
+ "file" : "lib/Apache/Session/Lock/File.pm",
+ "version" : "1.04"
+ },
+ "Apache::Session::Lock::MySQL" : {
+ "file" : "lib/Apache/Session/Lock/MySQL.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Lock::Null" : {
+ "file" : "lib/Apache/Session/Lock/Null.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Lock::Semaphore" : {
+ "file" : "lib/Apache/Session/Lock/Semaphore.pm",
+ "version" : "1.04"
+ },
+ "Apache::Session::Lock::Sybase" : {
+ "file" : "lib/Apache/Session/Lock/Sybase.pm",
+ "version" : "1.00"
+ },
+ "Apache::Session::MySQL" : {
+ "file" : "lib/Apache/Session/MySQL.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::MySQL::NoLock" : {
+ "file" : "lib/Apache/Session/MySQL/NoLock.pm",
+ "version" : "0.01"
+ },
+ "Apache::Session::Oracle" : {
+ "file" : "lib/Apache/Session/Oracle.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Postgres" : {
+ "file" : "lib/Apache/Session/Postgres.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Serialize::Base64" : {
+ "file" : "lib/Apache/Session/Serialize/Base64.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Serialize::Storable" : {
+ "file" : "lib/Apache/Session/Serialize/Storable.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Serialize::Sybase" : {
+ "file" : "lib/Apache/Session/Serialize/Sybase.pm",
+ "version" : "1.00"
+ },
+ "Apache::Session::Serialize::UUEncode" : {
+ "file" : "lib/Apache/Session/Serialize/UUEncode.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Store::DBI" : {
+ "file" : "lib/Apache/Session/Store/DBI.pm",
+ "version" : "1.02"
+ },
+ "Apache::Session::Store::DB_File" : {
+ "file" : "lib/Apache/Session/Store/DB_File.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Store::File" : {
+ "file" : "lib/Apache/Session/Store/File.pm",
+ "version" : "1.04"
+ },
+ "Apache::Session::Store::Informix" : {
+ "file" : "lib/Apache/Session/Store/Informix.pm",
+ "version" : "1.02"
+ },
+ "Apache::Session::Store::MySQL" : {
+ "file" : "lib/Apache/Session/Store/MySQL.pm",
+ "version" : "1.04"
+ },
+ "Apache::Session::Store::Oracle" : {
+ "file" : "lib/Apache/Session/Store/Oracle.pm",
+ "version" : "1.10"
+ },
+ "Apache::Session::Store::Postgres" : {
+ "file" : "lib/Apache/Session/Store/Postgres.pm",
+ "version" : "1.03"
+ },
+ "Apache::Session::Store::Sybase" : {
+ "file" : "lib/Apache/Session/Store/Sybase.pm",
+ "version" : "1.01"
+ },
+ "Apache::Session::Sybase" : {
+ "file" : "lib/Apache/Session/Sybase.pm",
+ "version" : "1.00"
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "license" : [
+ "http://dev.perl.org/licenses/"
+ ],
+ "repository" : {
+ "url" : "http://github.com/chorny/Apache-Session"
+ }
+ },
+ "version" : "1.90"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/META.yml
new/Apache-Session-1.90/META.yml
--- old/Apache-Session-1.89/META.yml 2010-09-22 00:53:04.000000000 +0200
+++ new/Apache-Session-1.90/META.yml 2013-01-27 14:34:41.000000000 +0100
@@ -1,12 +1,13 @@
---
-abstract: 'A persistence framework for session data'
+abstract: A persistence framework for session data
author:
- 'Casey West <casey[at]geeknest.com>'
build_requires:
Test::Deep: 0.082
Test::Exception: 0.15
Test::More: 0.47
-generated_by: 'Module::Build version 0.3614'
+dynamic_config: 1
+generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version
2.112150'
keywords:
- CGI
- session
@@ -19,7 +20,7 @@
provides:
Apache::Session:
file: lib/Apache/Session.pm
- version: 1.89
+ version: 1.90
Apache::Session::DB_File:
file: lib/Apache/Session/DB_File.pm
version: 1.01
@@ -59,6 +60,9 @@
Apache::Session::MySQL:
file: lib/Apache/Session/MySQL.pm
version: 1.01
+ Apache::Session::MySQL::NoLock:
+ file: lib/Apache/Session/MySQL/NoLock.pm
+ version: 0.01
Apache::Session::Oracle:
file: lib/Apache/Session/Oracle.pm
version: 1.01
@@ -88,13 +92,13 @@
version: 1.04
Apache::Session::Store::Informix:
file: lib/Apache/Session/Store/Informix.pm
- version: 1.01
+ version: 1.02
Apache::Session::Store::MySQL:
file: lib/Apache/Session/Store/MySQL.pm
version: 1.04
Apache::Session::Store::Oracle:
file: lib/Apache/Session/Store/Oracle.pm
- version: 1.01
+ version: 1.10
Apache::Session::Store::Postgres:
file: lib/Apache/Session/Store/Postgres.pm
version: 1.03
@@ -114,4 +118,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://github.com/chorny/Apache-Session
-version: 1.89
+version: 1.90
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Apache-Session-1.89/lib/Apache/Session/MySQL/NoLock.pm
new/Apache-Session-1.90/lib/Apache/Session/MySQL/NoLock.pm
--- old/Apache-Session-1.89/lib/Apache/Session/MySQL/NoLock.pm 1970-01-01
01:00:00.000000000 +0100
+++ new/Apache-Session-1.90/lib/Apache/Session/MySQL/NoLock.pm 2012-12-24
22:22:03.000000000 +0100
@@ -0,0 +1,92 @@
+#############################################################################
+#
+# Apache::Session::MySQL::NoLock
+# Apache persistent user sessions in a MySQL database without locking
+# Copyright(c) 2010 Tomas (t0m) Doran ([email protected])
+# Distribute under the Perl License
+#
+############################################################################
+
+package Apache::Session::MySQL::NoLock;
+
+use strict;
+use vars qw(@ISA $VERSION);
+
+$VERSION = '0.01';
+@ISA = qw(Apache::Session);
+
+use Apache::Session;
+use Apache::Session::Lock::Null;
+use Apache::Session::Store::MySQL;
+use Apache::Session::Generate::MD5;
+use Apache::Session::Serialize::Storable;
+
+sub populate {
+ my $self = shift;
+
+ $self->{object_store} = new Apache::Session::Store::MySQL $self;
+ $self->{lock_manager} = new Apache::Session::Lock::Null $self;
+ $self->{generate} = \&Apache::Session::Generate::MD5::generate;
+ $self->{validate} = \&Apache::Session::Generate::MD5::validate;
+ $self->{serialize} = \&Apache::Session::Serialize::Storable::serialize;
+ $self->{unserialize} =
\&Apache::Session::Serialize::Storable::unserialize;
+
+ return $self;
+}
+
+1;
+
+=pod
+
+=head1 NAME
+
+Apache::Session::MySQL::NoLock - An implementation of Apache::Session::MySQL
without locking
+
+=head1 SYNOPSIS
+
+ use Apache::Session::MySQL::NoLock;
+
+ #if you want Apache::Session to open new DB handles:
+
+ tie %hash, 'Apache::Session::MySQL::NoLock', $id, {
+ DataSource => 'dbi:mysql:sessions',
+ UserName => $db_user,
+ Password => $db_pass,
+ };
+
+ #or, if your handles are already opened:
+
+ tie %hash, 'Apache::Session::MySQL::NoLock', $id, {
+ Handle => $dbh,
+ };
+
+ To configure the non-locking session store in RT (what I use this module for),
+ put the following into your C<RT_SiteConfig.pm> module:
+
+ Set($WebSessionClass , 'Apache::Session::MySQL::NoLock');
+
+=head1 DESCRIPTION
+
+This module is an implementation of Apache::Session. It uses the MySQL backing
+store and the Null locking scheme. See the example, and the documentation for
+Apache::Session::Store::MySQL for more details.
+
+=head1 WARNING
+
+This module explicitly B<DOES NOT DO ANY LOCKING>. This can cause your session
+data to be overwritten or stale data to be read by subsequent requests.
+
+This B<CAN CAUSE LARGE PROBLEMS IN YOUR APPLICATION>.
+
+=head1 AUTHOR
+
+This module was written by Tomas Doran <[email protected]>.
+
+=head1 SEE ALSO
+
+L<Apache::Session::MySQL>, L<Apache::Session::Flex>,
+L<Apache::Session>
+
+=cut
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Apache-Session-1.89/lib/Apache/Session/Store/Informix.pm
new/Apache-Session-1.90/lib/Apache/Session/Store/Informix.pm
--- old/Apache-Session-1.89/lib/Apache/Session/Store/Informix.pm
2009-09-15 23:08:50.000000000 +0200
+++ new/Apache-Session-1.90/lib/Apache/Session/Store/Informix.pm
2013-01-27 14:27:36.000000000 +0100
@@ -17,7 +17,7 @@
use vars qw(@ISA $VERSION);
@ISA = qw(Apache::Session::Store::DBI);
-$VERSION = '1.01';
+$VERSION = '1.02';
$Apache::Session::Store::Informix::DataSource = undef;
$Apache::Session::Store::Informix::UserName = undef;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Apache-Session-1.89/lib/Apache/Session/Store/Oracle.pm
new/Apache-Session-1.90/lib/Apache/Session/Store/Oracle.pm
--- old/Apache-Session-1.89/lib/Apache/Session/Store/Oracle.pm 2009-09-15
23:08:50.000000000 +0200
+++ new/Apache-Session-1.90/lib/Apache/Session/Store/Oracle.pm 2013-01-27
14:27:31.000000000 +0100
@@ -17,7 +17,7 @@
use vars qw(@ISA $VERSION);
@ISA = qw(Apache::Session::Store::DBI);
-$VERSION = '1.01';
+$VERSION = '1.10';
$Apache::Session::Store::Oracle::DataSource = undef;
$Apache::Session::Store::Oracle::UserName = undef;
@@ -29,6 +29,8 @@
return if (defined $self->{dbh});
+ $self->{'table_name'} = $session->{args}->{TableName} ||
$Apache::Session::Store::DBI::TableName;
+
if (exists $session->{args}->{Handle}) {
$self->{dbh} = $session->{args}->{Handle};
$self->{commit} = $session->{args}->{Commit};
@@ -69,7 +71,7 @@
if (!defined $self->{materialize_sth}) {
$self->{materialize_sth} =
$self->{dbh}->prepare_cached(qq{
- SELECT a_session FROM sessions WHERE id = ? FOR UPDATE});
+ SELECT a_session FROM $self->{'table_name'} WHERE id = ? FOR
UPDATE});
}
$self->{materialize_sth}->bind_param(1, $session->{data}->{_session_id});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Apache-Session-1.89/lib/Apache/Session/Store/Postgres.pm
new/Apache-Session-1.90/lib/Apache/Session/Store/Postgres.pm
--- old/Apache-Session-1.89/lib/Apache/Session/Store/Postgres.pm
2009-09-15 23:08:50.000000000 +0200
+++ new/Apache-Session-1.90/lib/Apache/Session/Store/Postgres.pm
2012-12-19 00:18:14.000000000 +0100
@@ -80,6 +80,7 @@
my $results = $self->{materialize_sth}->fetchrow_arrayref;
if (!(defined $results)) {
+ $self->{materialize_sth}->finish;
die "Object does not exist in the data store";
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/lib/Apache/Session.pm
new/Apache-Session-1.90/lib/Apache/Session.pm
--- old/Apache-Session-1.89/lib/Apache/Session.pm 2010-09-22
00:52:30.000000000 +0200
+++ new/Apache-Session-1.90/lib/Apache/Session.pm 2013-01-27
14:27:10.000000000 +0100
@@ -325,7 +325,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '1.89';
+$VERSION = '1.90';
$VERSION = eval $VERSION;
#State constants
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/t/99mysql.t
new/Apache-Session-1.90/t/99mysql.t
--- old/Apache-Session-1.89/t/99mysql.t 2009-09-15 23:08:50.000000000 +0200
+++ new/Apache-Session-1.90/t/99mysql.t 2013-01-27 10:52:08.000000000 +0100
@@ -1,35 +1,69 @@
use Test::More;
use Test::Deep;
-use Test::Exception;
-use File::Temp qw[tempdir];
-use Cwd qw[getcwd];
-
-plan skip_all => "Not running RDBM tests without APACHE_SESSION_MAINTAINER=1"
- unless $ENV{APACHE_SESSION_MAINTAINER};
-plan skip_all => "Optional modules (DBD::mysql, DBI) not installed"
+
+#plan skip_all => "Not running RDBM tests without APACHE_SESSION_MAINTAINER=1"
+# unless ($ENV{APACHE_SESSION_MAINTAINER} || $ENV{TRAVIS});
+plan skip_all => "Optional modules (Test::Database, DBD::mysql, DBI) not
installed"
unless eval {
- require DBI;
+ require Test::Database;
require DBD::mysql;
+ require DBI;
};
+if ($ENV{TRAVIS}) {
+ my $cfg = << 'EOT';
+ driver_dsn = dbi:mysql:
+ username = root
+EOT
+ Test::Database->load_config(\$cfg);
+}
+
+my @db_handles = Test::Database->handles('mysql');
+
+plan skip_all => "No mysql handle reported by Test::Database"
+ unless @db_handles;
+
plan tests => 13;
my $package = 'Apache::Session::MySQL';
use_ok $package;
-#my $origdir = getcwd;
-#my $tempdir = tempdir( DIR => '.', CLEANUP => 1 );
-#chdir( $tempdir );
+my $mysql = $db_handles[0];
+my $dsn = $mysql->dsn();
+my $uname = $mysql->username();
+my $upass = $mysql->password();
+diag "Mysql version ".$mysql->driver->version;
+
+my @tables_used = qw/sessions s/;
+sub drop_tables {
+ my $dbh = shift;
+ foreach my $table (@_) {
+ $dbh->do("DROP TABLE IF EXISTS $table");
+ }
+}
+
+{
+ my $dbh1 = $mysql->dbh();
+ drop_tables($dbh1, @tables_used);
+ foreach my $table (@tables_used) {
+ $dbh1->do(<<"EOT");
+ CREATE TABLE $table (
+ id char(32) not null primary key,
+ a_session text
+ );
+EOT
+ }
+}
my $session = {};
tie %{$session}, $package, undef, {
- DataSource => 'dbi:mysql:sessions',
- UserName => 'test',
- Password => '',
- LockDataSource => 'dbi:mysql:sessions',
- LockUserName => 'test',
- LockPassword => ''
+ DataSource => $dsn,
+ UserName => $uname,
+ Password => $upass,
+ LockDataSource => $dsn,
+ LockUserName => $uname,
+ LockPassword => $upass,
};
ok tied(%{$session}), 'session tied';
@@ -46,12 +80,12 @@
$session = {};
tie %{$session}, $package, $id, {
- DataSource => 'dbi:mysql:sessions',
- UserName => 'test',
- Password => '',
- LockDataSource => 'dbi:mysql:sessions',
- LockUserName => 'test',
- LockPassword => ''
+ DataSource => $dsn,
+ UserName => $uname,
+ Password => $upass,
+ LockDataSource => $dsn,
+ LockUserName => $uname,
+ LockPassword => $upass,
};
ok tied(%{$session}), 'session tied';
@@ -66,13 +100,13 @@
$session = {};
tie %{$session}, $package, undef, {
- DataSource => 'dbi:mysql:sessions',
- UserName => 'test',
- Password => '',
TableName => 's',
- LockDataSource => 'dbi:mysql:sessions',
- LockUserName => 'test',
- LockPassword => ''
+ DataSource => $dsn,
+ UserName => $uname,
+ Password => $upass,
+ LockDataSource => $dsn,
+ LockUserName => $uname,
+ LockPassword => $upass,
};
ok tied(%{$session}), 'session tied';
@@ -83,7 +117,7 @@
undef $session;
$session = {};
-my $dbh = DBI->connect('dbi:mysql:sessions', 'test', '', {RaiseError => 1});
+my $dbh = DBI->connect($dsn, $uname, $upass, {RaiseError => 1});
tie %{$session}, $package, $id, {
Handle => $dbh,
@@ -101,4 +135,8 @@
untie %{$session};
$dbh->disconnect;
-#chdir( $origdir );
+unless ($ENV{TRAVIS}) {
+ my $dbh1 = $mysql->dbh();
+ drop_tables($dbh1, @tables_used);
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/t/99mysqllock.t
new/Apache-Session-1.90/t/99mysqllock.t
--- old/Apache-Session-1.89/t/99mysqllock.t 2009-09-15 23:08:50.000000000
+0200
+++ new/Apache-Session-1.90/t/99mysqllock.t 2013-01-27 12:24:12.000000000
+0100
@@ -1,30 +1,42 @@
use Test::More;
-#use Test::Exception;
-use File::Temp qw[tempdir];
-#use Cwd qw[getcwd];
-
-plan skip_all => "Not running RDBM tests without APACHE_SESSION_MAINTAINER=1"
- unless $ENV{APACHE_SESSION_MAINTAINER};
-plan skip_all => "Optional modules (DBD::mysql, DBI) not installed"
+
+#plan skip_all => "Not running RDBM tests without APACHE_SESSION_MAINTAINER=1"
+# unless $ENV{APACHE_SESSION_MAINTAINER};
+plan skip_all => "Optional modules (Test::Database, DBD::mysql, DBI) not
installed"
unless eval {
- require DBI;
+ require Test::Database;
require DBD::mysql;
+ require DBI;
};
+if ($ENV{TRAVIS}) {
+ my $cfg = << 'EOT';
+ driver_dsn = dbi:mysql:
+ username = root
+EOT
+ Test::Database->load_config(\$cfg);
+}
+
+my @db_handles = Test::Database->handles('mysql');
+
+plan skip_all => "No mysql handle reported by Test::Database"
+ unless @db_handles;
+
plan tests => 4;
my $package = 'Apache::Session::Lock::MySQL';
use_ok $package;
-#my $origdir = getcwd;
-#my $tempdir = tempdir( DIR => '.', CLEANUP => 1 );
-#chdir( $tempdir );
+my $mysql = $db_handles[0];
+my $dsn = $mysql->dsn();
+my $uname = $mysql->username();
+my $upass = $mysql->password();
my $session = {
args => {
- LockDataSource => 'dbi:mysql:test',
- LockUserName => 'test',
- LockPassword => ''
+ LockDataSource => $dsn,
+ LockUserName => $uname,
+ LockPassword => $upass,
},
data => {
_session_id => '09876543210987654321098765432109',
@@ -32,7 +44,7 @@
};
my $lock = $package->new;
-my $dbh = DBI->connect('dbi:mysql:test', 'test', '', {RaiseError => 1});
+my $dbh = DBI->connect($dsn, $uname, $upass, {RaiseError => 1});
my $sth = $dbh->prepare(q{SELECT
GET_LOCK('Apache-Session-09876543210987654321098765432109', 0)});
my $sth2 = $dbh->prepare(q{SELECT
RELEASE_LOCK('Apache-Session-09876543210987654321098765432109')});
@@ -64,5 +76,3 @@
$sth->finish;
$sth2->finish;
$dbh->disconnect;
-
-#chdir( $origdir );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/t/99mysqlstore.t
new/Apache-Session-1.90/t/99mysqlstore.t
--- old/Apache-Session-1.89/t/99mysqlstore.t 2009-09-15 23:08:50.000000000
+0200
+++ new/Apache-Session-1.90/t/99mysqlstore.t 2013-01-27 12:20:56.000000000
+0100
@@ -1,20 +1,13 @@
use Test::More;
-use Test::Exception;
-use File::Temp qw[tempdir];
-use Cwd qw[getcwd];
-plan skip_all => "Not running RDBM tests without APACHE_SESSION_MAINTAINER=1"
- unless $ENV{APACHE_SESSION_MAINTAINER};
+#plan skip_all => "Not running RDBM tests without APACHE_SESSION_MAINTAINER=1"
+# unless $ENV{APACHE_SESSION_MAINTAINER};
plan skip_all => "Optional modules (DBD::mysql, DBI) not installed"
unless eval {
- require DBI;
require DBD::mysql;
+ require DBI;
};
-#my $origdir = getcwd;
-#my $tempdir = tempdir( DIR => '.', CLEANUP => 1 );
-#chdir( $tempdir );
-
plan tests => 2;
my $package = 'Apache::Session::Store::MySQL';
@@ -23,5 +16,3 @@
my $foo = $package->new;
isa_ok $foo, $package;
-
-#chdir( $origdir );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/t/99oracle.t
new/Apache-Session-1.90/t/99oracle.t
--- old/Apache-Session-1.89/t/99oracle.t 2009-09-15 23:08:50.000000000
+0200
+++ new/Apache-Session-1.90/t/99oracle.t 2012-12-18 23:25:35.000000000
+0100
@@ -1,33 +1,43 @@
use Test::More;
use Test::Deep;
-use Test::Exception;
-use File::Temp qw[tempdir];
-use Cwd qw[getcwd];
plan skip_all => "Not running RDBM tests without APACHE_SESSION_MAINTAINER=1"
unless $ENV{APACHE_SESSION_MAINTAINER};
plan skip_all => "Optional modules (DBD::Oracle, DBI) not installed"
unless eval {
- require DBI;
require DBD::Oracle;
+ require DBI;
};
-#my $origdir = getcwd;
-#my $tempdir = tempdir( DIR => '.', CLEANUP => 1 );
-#chdir( $tempdir );
-
plan tests => 13;
my $package = 'Apache::Session::Oracle';
use_ok $package;
my $session = {};
+#$ENV{ORACLE_SID}='';$ENV{AS_ORACLE_USER}='test/test';
+my $dsn = "dbi:Oracle:$ENV{ORACLE_SID}";
+my $user = $ENV{AS_ORACLE_USER};
+my $pass = $ENV{AS_ORACLE_PASS};
+{
+ my $dbh = DBI->connect($dsn, $user, $pass, {RaiseError => 1, AutoCommit =>
1, PrintError=>0, });
+ foreach my $table (qw/sessions_perl/) {
+ eval { $dbh->do("DROP TABLE $table", {RaiseError => 0, PrintError=>0,
});};
+ $dbh->do(<<"EOT");
+ CREATE TABLE $table (
+ id varchar2(32) not null primary key,
+ a_session long
+ )
+EOT
+ }
+}
tie %{$session}, $package, undef, {
- DataSource => "dbi:Oracle:$ENV{ORACLE_SID}",
- UserName => $ENV{AS_ORACLE_USER},
- Password => $ENV{AS_ORACLE_PASS},
- Commit => 1
+ DataSource => $dsn,
+ UserName => $user,
+ Password => $pass,
+ Commit => 1,
+ TableName => 'sessions_perl',
};
ok tied(%{$session}), 'session tied';
@@ -44,10 +54,11 @@
$session = {};
tie %{$session}, $package, $id, {
- DataSource => "dbi:Oracle:$ENV{ORACLE_SID}",
- UserName => $ENV{AS_ORACLE_USER},
- Password => $ENV{AS_ORACLE_PASS},
- Commit => 1
+ DataSource => $dsn,
+ UserName => $user,
+ Password => $pass,
+ Commit => 1,
+ TableName => 'sessions_perl',
};
ok tied(%{$session}), 'session tied';
@@ -63,12 +74,13 @@
undef $session;
$session = {};
-my $dbh = DBI->connect("dbi:Oracle:$ENV{ORACLE_SID}", $ENV{AS_ORACLE_USER},
$ENV{AS_ORACLE_PASS}, {RaiseError => 1, AutoCommit => 0});
+my $dbh = DBI->connect($dsn, $user, $pass, {RaiseError => 1, AutoCommit => 0});
tie %{$session}, $package, $id, {
Handle => $dbh,
Commit => 0,
LongReadLen => 20*2**10,
+ TableName => 'sessions_perl',
};
ok tied(%{$session}), 'session tied';
@@ -84,6 +96,7 @@
tie %{$session}, $package, $id, {
Handle => $dbh,
Commit => 0,
+ TableName => 'sessions_perl',
};
ok tied(%{$session}), 'session tied';
@@ -98,5 +111,3 @@
$dbh->commit;
$dbh->disconnect;
-
-#chdir( $origdir );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Apache-Session-1.89/t/99postgres.t
new/Apache-Session-1.90/t/99postgres.t
--- old/Apache-Session-1.89/t/99postgres.t 2009-09-15 23:08:50.000000000
+0200
+++ new/Apache-Session-1.90/t/99postgres.t 2012-12-24 22:51:18.000000000
+0100
@@ -1,21 +1,15 @@
+
use Test::More;
use Test::Deep;
-use Test::Exception;
-use File::Temp qw[tempdir];
-use Cwd qw[getcwd];
plan skip_all => "Not running RDBM tests without APACHE_SESSION_MAINTAINER=1"
- unless $ENV{APACHE_SESSION_MAINTAINER};
+ unless ($ENV{APACHE_SESSION_MAINTAINER} || $ENV{TRAVIS});
plan skip_all => "Optional modules (DBD::Pg, DBI) not installed"
unless eval {
- require DBI;
require DBD::Pg;
+ require DBI;
};
-my $origdir = getcwd;
-my $tempdir = tempdir( DIR => '.', CLEANUP => 1 );
-chdir( $tempdir );
-
plan tests => 13;
my $package = 'Apache::Session::Postgres';
@@ -23,7 +17,22 @@
my $session = {};
-my ($dbname, $user, $pass) = ('sessions', 'postgres', '');
+my ($dbname, $user, $pass) = ('test', 'postgres', '');
+my $dsn = "dbi:Pg:database=$dbname";
+{
+
+ my $dbh1 = DBI->connect($dsn, $user, $pass, {RaiseError => 1, AutoCommit
=> 1, PrintError=>0, PrintWarn=>0,});
+ foreach my $table (qw/sessions s/) {
+ eval { $dbh1->do("DROP TABLE $table", {RaiseError => 0, PrintError=>0,
PrintWarn=>0,});};
+ $dbh1->do(<<"EOT");
+ CREATE TABLE $table (
+ id char(32) not null primary key,
+ a_session text
+ )
+EOT
+ }
+}
+
tie %{$session}, $package, undef, {
DataSource => "dbi:Pg:dbname=$dbname",
@@ -97,5 +106,3 @@
untie %{$session};
$dbh->commit;
$dbh->disconnect;
-
-chdir( $origdir );
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]