r70171 - in /branches/upstream/libjifty-dbi-perl/current: ./ lib/Jifty/ lib/Jifty/DBI/ t/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Tue Mar 1 12:25:25 UTC 2011
Author: jawnsy-guest
Date: Tue Mar 1 12:25:04 2011
New Revision: 70171
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=70171
Log:
[svn-upgrade] new version libjifty-dbi-perl (0.67)
Added:
branches/upstream/libjifty-dbi-perl/current/t/99-tabs.t
Modified:
branches/upstream/libjifty-dbi-perl/current/Changes
branches/upstream/libjifty-dbi-perl/current/MANIFEST
branches/upstream/libjifty-dbi-perl/current/META.yml
branches/upstream/libjifty-dbi-perl/current/SIGNATURE
branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm
branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Collection.pm
branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Column.pm
branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm
branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm
branches/upstream/libjifty-dbi-perl/current/t/99-pod-coverage.t
branches/upstream/libjifty-dbi-perl/current/t/99-pod-spelling.t
branches/upstream/libjifty-dbi-perl/current/t/99-pod.t
branches/upstream/libjifty-dbi-perl/current/t/metadata.t
Modified: branches/upstream/libjifty-dbi-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/Changes?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/Changes (original)
+++ branches/upstream/libjifty-dbi-perl/current/Changes Tue Mar 1 12:25:04 2011
@@ -1,4 +1,16 @@
Revision history for Perl extension Jifty::DBI.
+
+0.67 2011-02-28
+- Features:
+ * Make ->distinct_column_values use ->simple_query, thus going through our
+ SQL logging infrastructure (Alex Vandiver)
+
+- Fixes:
+ * Set raw_values in load_by_hash so the __raw_value method works when the
+ record is loaded by a collection (Thomas Sibley)
+
+- Tests:
+ * Author tests for no tabs (Shawn M Moore)
0.66 2011-02-14
- Features:
Modified: branches/upstream/libjifty-dbi-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/MANIFEST?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/MANIFEST (original)
+++ branches/upstream/libjifty-dbi-perl/current/MANIFEST Tue Mar 1 12:25:04 2011
@@ -99,6 +99,7 @@
t/99-pod-coverage.t
t/99-pod-spelling.t
t/99-pod.t
+t/99-tabs.t
t/case_sensitivity.t
t/metadata.t
t/testmodels.pl
Modified: branches/upstream/libjifty-dbi-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/META.yml?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/META.yml (original)
+++ branches/upstream/libjifty-dbi-perl/current/META.yml Tue Mar 1 12:25:04 2011
@@ -47,4 +47,4 @@
version: 0
resources:
license: http://dev.perl.org/licenses/
-version: 0.66
+version: 0.67
Modified: branches/upstream/libjifty-dbi-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/SIGNATURE?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/SIGNATURE (original)
+++ branches/upstream/libjifty-dbi-perl/current/SIGNATURE Tue Mar 1 12:25:04 2011
@@ -15,9 +15,9 @@
Hash: SHA1
SHA1 418a58763132c9a476627cbdce5ff01395ce84d4 .gitignore
-SHA1 37266036389c91467c5bccd288f584a2b2415617 Changes
-SHA1 18b75d45e40e1ff66f673bab9fdaf37edf93794e MANIFEST
-SHA1 e5d135ba5b8445d15c5f6e0998ac08a10504936f META.yml
+SHA1 45d9eaf8a622fdfc0bb9680396e2843eca5ec346 Changes
+SHA1 c2fb135f967d7093a6191d1b7e5e596e30040246 MANIFEST
+SHA1 f21d5f2dc45943fbc09ac079b2b18d942a6f3f81 META.yml
SHA1 48bd6ca8a37ec79b7cae91028d7e9489ad33a03b Makefile.PL
SHA1 e29d7b270f78a5a406921571b08290c46f2a42f6 README
SHA1 82d6ac3f6def48558d09f8b6e3b53ed4194d8c81 ROADMAP
@@ -41,11 +41,11 @@
SHA1 026cc0551a0ad399d195e395b46bdf842e115192 inc/Module/Install/Metadata.pm
SHA1 5457015ea5a50e93465bf2dafa29feebd547f85b inc/Module/Install/Win32.pm
SHA1 051e7fa8063908befa3440508d0584a2497b97db inc/Module/Install/WriteAll.pm
-SHA1 8963f051b47634cc0d5b8baf90804a2d6c59efe7 lib/Jifty/DBI.pm
-SHA1 b69be5d3f06d651772e4a65ec6e6e3da6e9e419d lib/Jifty/DBI/Collection.pm
+SHA1 84ab56168fb14f1530c035b549c2af0750f0fd60 lib/Jifty/DBI.pm
+SHA1 e0375edf9f501e6b9c723fced70431108188419b lib/Jifty/DBI/Collection.pm
SHA1 503ca4cf6693580dedf8adee58267532f8467908 lib/Jifty/DBI/Collection/Union.pm
SHA1 bcba77fd2bacf0475aea1de97f57365c8de92ca6 lib/Jifty/DBI/Collection/Unique.pm
-SHA1 ac2e81ee7f24e65bcb40c86746f3e4159aeefb25 lib/Jifty/DBI/Column.pm
+SHA1 3ff96d74a769439111fba7b42b0c100d180ba6cd lib/Jifty/DBI/Column.pm
SHA1 9f6a6435d358a79108e98e379e252139457c1e9f lib/Jifty/DBI/Filter.pm
SHA1 05d100a1a9cd24c6c0285660edf3758d5f04c1c7 lib/Jifty/DBI/Filter/Boolean.pm
SHA1 d0addaa43cfa8950cb33d42a364a3c3c56a2dd59 lib/Jifty/DBI/Filter/Date.pm
@@ -69,11 +69,11 @@
SHA1 cf80896a175702a157770f64ae469430678c3357 lib/Jifty/DBI/Handle/mysql.pm
SHA1 f2cc4fcce79c9a88a023d4e6bd96c2089eef1ced lib/Jifty/DBI/Handle/mysqlPP.pm
SHA1 b7eca843dfbf0607bde08f566b2d03ba52fe82fd lib/Jifty/DBI/HasFilters.pm
-SHA1 169e97345e6b581d88564da97cd3c1267ba0f010 lib/Jifty/DBI/Record.pm
+SHA1 e6710da080f80146fe7bbe75338c5ef382f0bd4a lib/Jifty/DBI/Record.pm
SHA1 663978b31373520d1e2deec87e957d1dbfd1347c lib/Jifty/DBI/Record/Cachable.pm
SHA1 e30b1a3be2101d839a0a57e921e6f87889ef8da1 lib/Jifty/DBI/Record/Memcached.pm
SHA1 53834b3315a509ba33a8647681f472d3ae7b0557 lib/Jifty/DBI/Record/Plugin.pm
-SHA1 67504194de870031d285ae4d45acf257738577f4 lib/Jifty/DBI/Schema.pm
+SHA1 302f3c09c4d5625ad8db4c0ddaafe8cd0207ea97 lib/Jifty/DBI/Schema.pm
SHA1 0e347c238e62424ca029d60ac03fce75bb2af2a2 lib/Jifty/DBI/SchemaGenerator.pm
SHA1 32834b7c4cf5a8d131382fccc8db341be8768291 t/00.load.t
SHA1 9aa7fed2b2409faa4c71d2a45db210721f47403e t/01-version_checks.t
@@ -111,17 +111,18 @@
SHA1 32457dd407414a89bd82d7fe59afab1014f8f920 t/18triggers.t
SHA1 befc46d5364088775b6dda5ae1cf970c1b0fa4e8 t/19reference.t
SHA1 72a16ddfc2642564023448450f3475ae5abf6d86 t/20overload.t
-SHA1 cf5b3950070fda63ba1b497f7d89dd6c36ae9c93 t/99-pod-coverage.t
-SHA1 12002f10b761d5952c5dc5143321379405283f9a t/99-pod-spelling.t
-SHA1 73b9826ff54a26efc2fa19edaf80d3ad961529be t/99-pod.t
+SHA1 0e7ceb6deb91ae0c15bbd42f946b65a44e704706 t/99-pod-coverage.t
+SHA1 6ab50a9c21584c841e8ece93bba46d779d82992b t/99-pod-spelling.t
+SHA1 8841b06de7875ffba985ce82c347737ca098aa1a t/99-pod.t
+SHA1 82ee6497512299eea11063a3610d4fbc429d49b6 t/99-tabs.t
SHA1 5e1158a9340410d46ffad19f381982159dccc924 t/case_sensitivity.t
-SHA1 1dd9675b0a9a59fdcd300f5d92297f0ecf4f03e4 t/metadata.t
+SHA1 f0ce911fe0b4bdc70fe9dbb524d8cd89bedfc904 t/metadata.t
SHA1 97e60dd523a74a886c170eeb05b813aa551f5efe t/testmodels.pl
SHA1 653c2f961d8b4f195e5391cd261f37815068e8d5 t/utils.pl
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.10 (Darwin)
+Version: GnuPG v1.4.10 (GNU/Linux)
-iEYEARECAAYFAk1ZnfAACgkQsxfQtHhyRPq6YQCfaTsXkpzasgXlv41gDq6JTpci
-khMAmwT7upq90E4xMjqIZEjJVVIcmRq9
-=osRu
+iD8DBQFNa8XhHdv9ZfNcOAcRAmUeAJ4zMQK4gRNn+i7pu3EzlZN2jhXkpQCfcgER
+Z8gawoecAhAUhGjBuFm0yAM=
+=1fkV
-----END PGP SIGNATURE-----
Modified: branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm (original)
+++ branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm Tue Mar 1 12:25:04 2011
@@ -2,7 +2,7 @@
use warnings;
use strict;
-$Jifty::DBI::VERSION = '0.66';
+$Jifty::DBI::VERSION = '0.67';
=head1 NAME
Modified: branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Collection.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Collection.pm?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Collection.pm (original)
+++ branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Collection.pm Tue Mar 1 12:25:04 2011
@@ -972,9 +972,16 @@
.' '. ($args{'sort'} =~ /^des/i ? 'DESC' : 'ASC');
}
- my $dbh = $self->_handle->dbh;
- my $list = $dbh->selectcol_arrayref( $query_string, { MaxRows => $args{'max'} } );
- return $list? @$list : ();
+ my $sth = $self->_handle->simple_query( $query_string ) or return;
+ my $value;
+ $sth->bind_col(1, \$value) or return;
+ my @col;
+ if ($args{max}) {
+ push @col, $value while 0 < $args{max}-- && $sth->fetch;
+ } else {
+ push @col, $value while $sth->fetch;
+ }
+ return @col;
}
=head2 items_array_ref
Modified: branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Column.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Column.pm?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Column.pm (original)
+++ branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Column.pm Tue Mar 1 12:25:04 2011
@@ -55,7 +55,7 @@
no strict 'refs';
*$attr = sub {
my $self = shift;
- $self->attributes({}) unless $self->attributes;
+ $self->attributes({}) unless $self->attributes;
return $self->attributes->{$attr} unless @_;
$self->attributes->{$attr} = (@_ == 1 ? $_[0] : [@_]);
}
@@ -91,7 +91,7 @@
# not in @attrs into attributes and just pass the whole hash
$self->attributes({});
for (keys %$args) {
- $self->can($_) ? $self->$_($args->{$_}) : $self->attributes->{$_} = $args->{$_};
+ $self->can($_) ? $self->$_($args->{$_}) : $self->attributes->{$_} = $args->{$_};
}
return $self;
Modified: branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm (original)
+++ branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm Tue Mar 1 12:25:04 2011
@@ -1215,7 +1215,8 @@
# Optimization for loading from database
$self->{values} = $hashref;
$self->{fetched}{$_} = 1 for keys %{$hashref};
- $self->{raw_values} = {};
+ # copy $hashref so changing 'values' doesn't change 'raw_values'
+ $self->{raw_values}{$_} = $hashref->{$_} for keys %{$hashref};
$self->{decoded} = {};
return $self->{values}{id};
}
@@ -1231,6 +1232,7 @@
foreach my $col ( grep exists $hashref->{ lc $_ }, map $_->name, $self->columns ) {
$self->{'fetched'}{$col} = 1;
$self->{'values'}{$col} = $hashref->{ lc $col };
+ $self->{'raw_values'}{$col} = $hashref->{ lc $col };
}
$self->{'decoded'} = {};
Modified: branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm (original)
+++ branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm Tue Mar 1 12:25:04 2011
@@ -73,7 +73,7 @@
# looks like a type name but not found
return ($_[0] => 1) unless $typehandler;
return $typehandler->();
- },
+ },
are => '',
as => '',
ajax => 'ajax_',
@@ -208,26 +208,26 @@
my $from = caller;
my $new_code = sub {
- no warnings 'redefine';
- local *_ = sub { my $args = \@_; defer { _(@$args) } };
- $from->_init_columns;
-
- my @columns = &declare($code);
-
- # Unimport all our symbols from the calling package,
- # except for "lazy" and "defer".
- foreach my $sym (@EXPORT) {
- next if $sym eq 'lazy' or $sym eq 'defer';
-
- no strict 'refs';
- undef *{"$from\::$sym"}
- if \&{"$from\::$sym"} == \&$sym;
- }
-
- foreach my $column (@columns) {
- next if !ref($column);
- _init_column($column);
- }
+ no warnings 'redefine';
+ local *_ = sub { my $args = \@_; defer { _(@$args) } };
+ $from->_init_columns;
+
+ my @columns = &declare($code);
+
+# Unimport all our symbols from the calling package,
+ # except for "lazy" and "defer".
+ foreach my $sym (@EXPORT) {
+ next if $sym eq 'lazy' or $sym eq 'defer';
+
+ no strict 'refs';
+ undef *{"$from\::$sym"}
+ if \&{"$from\::$sym"} == \&$sym;
+ }
+
+ foreach my $column (@columns) {
+ next if !ref($column);
+ _init_column($column);
+ }
$from->_init_methods_for_columns;
};
Modified: branches/upstream/libjifty-dbi-perl/current/t/99-pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/t/99-pod-coverage.t?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/t/99-pod-coverage.t (original)
+++ branches/upstream/libjifty-dbi-perl/current/t/99-pod-coverage.t Tue Mar 1 12:25:04 2011
@@ -1,7 +1,8 @@
use Test::More;
+plan skip_all => "Coverage tests only run for authors" unless (-d 'inc/.author');
+
eval "use Test::Pod::Coverage 1.00";
plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;
-plan skip_all => "Coverage tests only run for authors" unless (-d 'inc/.author');
all_pod_coverage_ok( );
# Workaround for dumb bug (fixed in 5.8.7) where Test::Builder thinks that
Modified: branches/upstream/libjifty-dbi-perl/current/t/99-pod-spelling.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/t/99-pod-spelling.t?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/t/99-pod-spelling.t (original)
+++ branches/upstream/libjifty-dbi-perl/current/t/99-pod-spelling.t Tue Mar 1 12:25:04 2011
@@ -3,8 +3,9 @@
use strict;
use Test::More;
eval "use Test::Spelling";
+plan skip_all => "Coverage tests only run for authors" unless (-d 'inc/.author');
+
plan skip_all => "Test::Spelling required for testing POD spelling" if $@;
-plan skip_all => "Coverage tests only run for authors" unless (-d 'inc/.author');
add_stopwords(<DATA>);
Modified: branches/upstream/libjifty-dbi-perl/current/t/99-pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/t/99-pod.t?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/t/99-pod.t (original)
+++ branches/upstream/libjifty-dbi-perl/current/t/99-pod.t Tue Mar 1 12:25:04 2011
@@ -1,5 +1,6 @@
use Test::More;
+plan skip_all => "Coverage tests only run for authors" unless (-d 'inc/.author');
+
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
-plan skip_all => "Coverage tests only run for authors" unless (-d 'inc/.author');
all_pod_files_ok();
Added: branches/upstream/libjifty-dbi-perl/current/t/99-tabs.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/t/99-tabs.t?rev=70171&op=file
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/t/99-tabs.t (added)
+++ branches/upstream/libjifty-dbi-perl/current/t/99-tabs.t Tue Mar 1 12:25:04 2011
@@ -1,0 +1,7 @@
+use Test::More;
+plan skip_all => "Tab tests only run for authors" unless (-d 'inc/.author');
+
+eval "use Test::NoTabs 1.00";
+plan skip_all => "Test::NoTabs 1.00 required for testing POD coverage" if $@;
+
+all_perl_files_ok('lib', 't');
Modified: branches/upstream/libjifty-dbi-perl/current/t/metadata.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/t/metadata.t?rev=70171&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/t/metadata.t (original)
+++ branches/upstream/libjifty-dbi-perl/current/t/metadata.t Tue Mar 1 12:25:04 2011
@@ -33,12 +33,12 @@
my $rec = TestApp::User->new( handle => $handle );
isa_ok($rec, 'Jifty::DBI::Record');
- my $col = $rec->column('name');
- is($col->label, 'Name');
+ my $col = $rec->column('name');
+ is($col->label, 'Name');
- is($col->attributes->{arbitary_data}, 'fooo');
+ is($col->attributes->{arbitary_data}, 'fooo');
- is_deeply($col->serialize_metadata, { type => 'varchar', label => 'Name', sort_order => 0, writable => 1, name => 'name', readable => 1 });
+ is_deeply($col->serialize_metadata, { type => 'varchar', label => 'Name', sort_order => 0, writable => 1, name => 'name', readable => 1 });
cleanup_schema( 'TestApp', $handle );
disconnect_handle( $handle );
More information about the Pkg-perl-cvs-commits
mailing list