r35201 - in /branches/upstream/librose-db-perl/current: Changes META.yml 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:32:10 UTC 2009


Author: bricas-guest
Date: Mon May 11 17:32:05 2009
New Revision: 35201

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35201
Log:
[svn-upgrade] Integrating new upstream version, librose-db-perl (0.752)

Modified:
    branches/upstream/librose-db-perl/current/Changes
    branches/upstream/librose-db-perl/current/META.yml
    branches/upstream/librose-db-perl/current/lib/Rose/DB.pm
    branches/upstream/librose-db-perl/current/lib/Rose/DB/MySQL.pm
    branches/upstream/librose-db-perl/current/lib/Rose/DB/SQLite.pm

Modified: branches/upstream/librose-db-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-perl/current/Changes?rev=35201&op=diff
==============================================================================
--- branches/upstream/librose-db-perl/current/Changes (original)
+++ branches/upstream/librose-db-perl/current/Changes Mon May 11 17:32:05 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: branches/upstream/librose-db-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-perl/current/META.yml?rev=35201&op=diff
==============================================================================
--- branches/upstream/librose-db-perl/current/META.yml (original)
+++ branches/upstream/librose-db-perl/current/META.yml Mon May 11 17:32:05 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Rose-DB
-version:            0.751
+version:            0.752
 abstract:           ~
 author:  []
 license:            perl

Modified: branches/upstream/librose-db-perl/current/lib/Rose/DB.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-perl/current/lib/Rose/DB.pm?rev=35201&op=diff
==============================================================================
--- branches/upstream/librose-db-perl/current/lib/Rose/DB.pm (original)
+++ branches/upstream/librose-db-perl/current/lib/Rose/DB.pm Mon May 11 17:32:05 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: branches/upstream/librose-db-perl/current/lib/Rose/DB/MySQL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-perl/current/lib/Rose/DB/MySQL.pm?rev=35201&op=diff
==============================================================================
--- branches/upstream/librose-db-perl/current/lib/Rose/DB/MySQL.pm (original)
+++ branches/upstream/librose-db-perl/current/lib/Rose/DB/MySQL.pm Mon May 11 17:32:05 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: branches/upstream/librose-db-perl/current/lib/Rose/DB/SQLite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librose-db-perl/current/lib/Rose/DB/SQLite.pm?rev=35201&op=diff
==============================================================================
--- branches/upstream/librose-db-perl/current/lib/Rose/DB/SQLite.pm (original)
+++ branches/upstream/librose-db-perl/current/lib/Rose/DB/SQLite.pm Mon May 11 17:32:05 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