r35203 - in /trunk/librose-db-perl: Changes META.yml debian/changelog lib/Rose/DB.pm lib/Rose/DB/MySQL.pm lib/Rose/DB/SQLite.pm
bricas-guest at users.alioth.debian.org
bricas-guest at users.alioth.debian.org
Mon May 11 17:33:34 UTC 2009
Author: bricas-guest
Date: Mon May 11 17:33:27 2009
New Revision: 35203
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35203
Log:
New upstream release
Modified:
trunk/librose-db-perl/Changes
trunk/librose-db-perl/META.yml
trunk/librose-db-perl/debian/changelog
trunk/librose-db-perl/lib/Rose/DB.pm
trunk/librose-db-perl/lib/Rose/DB/MySQL.pm
trunk/librose-db-perl/lib/Rose/DB/SQLite.pm
Modified: trunk/librose-db-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/Changes?rev=35203&op=diff
==============================================================================
--- trunk/librose-db-perl/Changes (original)
+++ trunk/librose-db-perl/Changes Mon May 11 17:33:27 2009
@@ -1,3 +1,11 @@
+0.752 (05.08.2009) - John Siracusa <siracusa at gmail.com>
+
+ * Added workaround for the lack of getpwuid() on Windows.
+ * SQLite column and table names are not properly unquoted when
+ necessary. (RT 45836)
+ * Indicate that MySQL 5.0.45 and later supports selecting from
+ a subselect.
+
0.751 (04.19.2009) - John Siracusa <siracusa at gmail.com>
* Worked around a mod_perl 2 issue related to PerlOptions +Parent
Modified: trunk/librose-db-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/META.yml?rev=35203&op=diff
==============================================================================
--- trunk/librose-db-perl/META.yml (original)
+++ trunk/librose-db-perl/META.yml Mon May 11 17:33:27 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Rose-DB
-version: 0.751
+version: 0.752
abstract: ~
author: []
license: perl
Modified: trunk/librose-db-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/debian/changelog?rev=35203&op=diff
==============================================================================
--- trunk/librose-db-perl/debian/changelog (original)
+++ trunk/librose-db-perl/debian/changelog Mon May 11 17:33:27 2009
@@ -1,3 +1,9 @@
+librose-db-perl (0.752-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Brian Cassidy <brian.cassidy at gmail.com> Mon, 11 May 2009 14:32:47 -0300
+
librose-db-perl (0.751-1) unstable; urgency=low
[ Brian Cassidy ]
Modified: trunk/librose-db-perl/lib/Rose/DB.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB.pm?rev=35203&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB.pm Mon May 11 17:33:27 2009
@@ -20,7 +20,7 @@
our $Error;
-our $VERSION = '0.751';
+our $VERSION = '0.752';
our $Debug = 0;
@@ -2168,19 +2168,26 @@
if($@ || !defined $rosedb_devinit)
{
- my $username = lc getpwuid($<);
- $rosedb_devinit = "Rose::DB::Devel::Init::$username";
- eval qq(require $rosedb_devinit);
-
- if($@)
- {
- eval { do $rosedb_devinit };
- }
- else
- {
- if($rosedb_devinit->can('fixup'))
+ my $username;
+
+ # The getpwuid() function is often(?) unimplemented in perl on Windows.
+ eval { $username = lc getpwuid($<) };
+
+ unless($@)
+ {
+ $rosedb_devinit = "Rose::DB::Devel::Init::$username";
+ eval qq(require $rosedb_devinit);
+
+ if($@)
{
- $rosedb_devinit->fixup($class);
+ eval { do $rosedb_devinit };
+ }
+ else
+ {
+ if($rosedb_devinit->can('fixup'))
+ {
+ $rosedb_devinit->fixup($class);
+ }
}
}
}
@@ -2613,6 +2620,8 @@
The C<ROSEDB_DEVINIT> file or module is used during development, usually to set up data sources for a particular developer's database or project. If the C<ROSEDB_DEVINIT> environment variable is set, it should be the name of a Perl module or file. If it is a Perl module and that module has a C<fixup()> subroutine, it will be called as a class method after the module is loaded.
If the C<ROSEDB_DEVINIT> environment variable is not set, or if the specified file does not exist or has errors, then it defaults to the package name C<Rose::DB::Devel::Init::username>, where "username" is the account name of the current user.
+
+B<Note:> if the L<getpwuid()|perlfunc/getpwuid> function is unavailable (as is often the case on Windows versions of perl) then this default does not apply and the loading of the module named C<Rose::DB::Devel::Init::username> is not attempted.
The C<ROSEDB_DEVINIT> file or module may contain arbitrary Perl code which will be loaded and evaluated in the context of L<Rose::DB>. Example:
Modified: trunk/librose-db-perl/lib/Rose/DB/MySQL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB/MySQL.pm?rev=35203&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB/MySQL.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB/MySQL.pm Mon May 11 17:33:27 2009
@@ -11,7 +11,7 @@
use Rose::DB;
-our $VERSION = '0.745';
+our $VERSION = '0.752';
our $Debug = 0;
@@ -421,6 +421,23 @@
return $self->{'supports_on_duplicate_key_update'} = 0;
}
+sub supports_select_from_subselect
+{
+ my($self) = shift;
+
+ if(defined $self->{'supports_select_from_subselect'})
+ {
+ return $self->{'supports_select_from_subselect'};
+ }
+
+ if($self->database_version >= 5_000_045)
+ {
+ return $self->{'supports_select_from_subselect'} = 1;
+ }
+
+ return $self->{'supports_select_from_subselect'} = 0;
+}
+
#our %Reserved_Words = map { $_ => 1 } qw(read for case);
#sub is_reserved_word { $Reserved_Words{lc $_[1]} }
Modified: trunk/librose-db-perl/lib/Rose/DB/SQLite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB/SQLite.pm?rev=35203&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB/SQLite.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB/SQLite.pm Mon May 11 17:33:27 2009
@@ -7,7 +7,7 @@
use Rose::DB;
use SQL::ReservedWords::SQLite();
-our $VERSION = '0.745';
+our $VERSION = '0.752';
#our $Debug = 0;
@@ -357,7 +357,7 @@
# Column definitions
while($sql =~ s/^$Column_Def (?:\s*,\s*|\s*$)//six)
{
- my $col_name = $1;
+ my $col_name = _unquote_name($1);
my $col_type = $2 || 'scalar';
my $constraints = $3;
@@ -405,7 +405,7 @@
}
elsif(/^\s* UNIQUE (?: \s+ KEY)? \b/six)
{
- push(@uk_info, [ _unquote_name($col_name) ]);
+ push(@uk_info, [ $col_name ]);
}
elsif(/^NOT \s+ NULL \b/six)
{
More information about the Pkg-perl-cvs-commits
mailing list