diff --git a/AUTHORS b/AUTHORS index a17d893..b7d217c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -111,6 +111,7 @@ kkane: Kevin L. Kane konobi: Scott McWhirter lejeunerenard: Sean Zellmer +leont: Leon Timmermans littlesavage: Alexey Illarionov lukes: Luke Saunders marcus: Marcus Ramberg diff --git a/Changes b/Changes index 981c422..e8fb7ed 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,12 @@ Revision history for DBIx::Class + +0.082843 2022-05-17 10:50 (UTC) + * Fixes + - Adjust tests to account for DBD::SQLite's column_info() no longer + being case-preserving in recent versions + - Fix t/storage/replicated.t relying on no-longer-available module + - Adjust t/53lean_startup.t to work around spurious changes in + Perl5 core (GH#143) 0.082842 2020-06-16 20:10 (UTC) * New Features diff --git a/LICENSE b/LICENSE index 4101961..aeb1e1a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -DBIx::Class is Copyright (c) 2005-2020 by mst, castaway, ribasushi, and others. +DBIx::Class is Copyright (c) 2005-2022 by mst, castaway, ribasushi, and others. See AUTHORS and LICENSE included with this distribution. All rights reserved. This is free software; you can redistribute it and/or modify it under the diff --git a/META.yml b/META.yml index 7637687..f98ce06 100644 --- a/META.yml +++ b/META.yml @@ -62,7 +62,7 @@ bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=DBIx-Class license: http://dev.perl.org/licenses/ repository: https://github.com/Perl5/DBIx-Class -version: 0.082842 +version: 0.082843 x_authority: cpan:RIBASUSHI x_contributors: - 'abraxxa: Alexander Hartmaier ' @@ -167,6 +167,7 @@ - 'kkane: Kevin L. Kane ' - 'konobi: Scott McWhirter ' - 'lejeunerenard: Sean Zellmer ' + - 'leont: Leon Timmermans ' - 'littlesavage: Alexey Illarionov ' - 'lukes: Luke Saunders ' - 'marcus: Marcus Ramberg ' diff --git a/README b/README index 5e38e3b..9258849 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DBIx::Class is Copyright (c) 2005-2020 by mst, castaway, ribasushi, and others. +DBIx::Class is Copyright (c) 2005-2022 by mst, castaway, ribasushi, and others. See AUTHORS and LICENSE included with this distribution. All rights reserved. NAME @@ -191,7 +191,7 @@ questions and suggestions have been shown to catalyze monumental improvements in consistency, accuracy and performance. - List of the awesome contributors who made DBIC v0.082842 possible + List of the awesome contributors who made DBIC v0.082843 possible abraxxa: Alexander Hartmaier @@ -396,6 +396,8 @@ konobi: Scott McWhirter lejeunerenard: Sean Zellmer + + leont: Leon Timmermans littlesavage: Alexey Illarionov diff --git a/examples/Schema/db/example.db b/examples/Schema/db/example.db index f345ce6..5c6274e 100644 Binary files a/examples/Schema/db/example.db and b/examples/Schema/db/example.db differ diff --git a/lib/DBIx/Class/CDBICompat/GetSet.pm b/lib/DBIx/Class/CDBICompat/GetSet.pm index dd621f2..f28baf1 100644 --- a/lib/DBIx/Class/CDBICompat/GetSet.pm +++ b/lib/DBIx/Class/CDBICompat/GetSet.pm @@ -3,8 +3,6 @@ use strict; use warnings; - -#use base qw/Class::Accessor/; sub get { my ($self, @cols) = @_; diff --git a/lib/DBIx/Class/Optional/Dependencies.pod b/lib/DBIx/Class/Optional/Dependencies.pod index 165c078..0940aed 100644 --- a/lib/DBIx/Class/Optional/Dependencies.pod +++ b/lib/DBIx/Class/Optional/Dependencies.pod @@ -18,7 +18,7 @@ ... - configure_requires 'DBIx::Class' => '0.082842'; + configure_requires 'DBIx::Class' => '0.082843'; require DBIx::Class::Optional::Dependencies; diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index ed887a5..1831a3c 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -11,7 +11,7 @@ # $VERSION declaration must stay up here, ahead of any other package # declarations, as to not confuse various modules attempting to determine # this ones version, whether that be s.c.o. or Module::Metadata, etc -$VERSION = '0.082842'; +$VERSION = '0.082843'; { package diff --git a/lib/DBIx/Class.pod b/lib/DBIx/Class.pod index 0cfdf28..fcec89c 100644 --- a/lib/DBIx/Class.pod +++ b/lib/DBIx/Class.pod @@ -209,7 +209,7 @@ the seemingly most insignificant questions and suggestions have been shown to catalyze monumental improvements in consistency, accuracy and performance. -List of the awesome contributors who made DBIC v0.082842 possible +List of the awesome contributors who made DBIC v0.082843 possible =encoding utf8 @@ -418,6 +418,8 @@ B: Scott McWhirter B: Sean Zellmer + +B: Leon Timmermans B: Alexey Illarionov diff --git a/t/53lean_startup.t b/t/53lean_startup.t index 9a4ef85..843c72b 100644 --- a/t/53lean_startup.t +++ b/t/53lean_startup.t @@ -30,7 +30,7 @@ # exclude our test suite, known "module require-rs" and eval frames $caller[1] =~ /^ t [\/\\] /x or - $caller[0] =~ /^ (?: base | parent | Class::C3::Componentised | Module::Inspector | Module::Runtime ) $/x + $caller[0] =~ /^ (?: base | parent | Class::C3::Componentised | Module::Inspector | Module::Runtime ) $/x && $caller[3] !~ m/::BEGIN$/ or $caller[3] eq '(eval)', ) diff --git a/t/60core.t b/t/60core.t index 9ee9b6d..352cab5 100644 --- a/t/60core.t +++ b/t/60core.t @@ -4,6 +4,7 @@ use Test::More; use Test::Exception; use Test::Warn; +use Test::Deep; use lib qw(t/lib); use DBICTest ':DiffSQL'; @@ -387,7 +388,7 @@ $schema->source("Artist")->column_info_from_storage(1); $schema->source("Artist")->{_columns_info_loaded} = 0; - is_deeply ( + cmp_deeply ( $schema->source('Artist')->columns_info, { artistid => { @@ -410,7 +411,7 @@ size => 100 }, rank => { - data_type => "integer", + data_type => re(qr/^integer$/i), default_value => 13, is_nullable => 0, size => undef @@ -421,7 +422,7 @@ ok($schema->source("Artist")->{_columns_info_loaded} == 1, 'Columns info loaded flag set'); - is_deeply ( + cmp_deeply ( $schema->source('Artist')->columns_info([qw/artistid rank/]), { artistid => { @@ -431,7 +432,7 @@ size => undef }, rank => { - data_type => "integer", + data_type => re(qr/^integer$/i), default_value => 13, is_nullable => 0, size => undef diff --git a/t/64db.t b/t/64db.t index d1284f8..528ba40 100644 --- a/t/64db.t +++ b/t/64db.t @@ -2,6 +2,7 @@ use warnings; use Test::More; +use Test::Deep; use lib qw(t/lib); use DBICTest; @@ -48,7 +49,7 @@ ); { - is_deeply ( + cmp_deeply ( get_storage_column_info ($schema->storage, 'artist', qw/size/), { 'artistid' => { @@ -60,7 +61,7 @@ 'is_nullable' => 1, }, 'rank' => { - 'data_type' => 'integer', + 'data_type' => re(qr/^integer$/i), 'is_nullable' => 0, 'default_value' => '13', }, diff --git a/t/prefetch/standard.t b/t/prefetch/standard.t index 69574ab..57dc075 100644 --- a/t/prefetch/standard.t +++ b/t/prefetch/standard.t @@ -21,21 +21,24 @@ ok(!defined $cd[0]->liner_notes, 'No prefetch for NULL LEFT join'); - is($cd[1]->{_relationship_data}{liner_notes}->notes, 'Buy Whiskey!', 'Prefetch for present LEFT JOIN'); + is($cd[1]->liner_notes->notes, 'Buy Whiskey!', 'Prefetch for present LEFT JOIN'); is(ref $cd[1]->liner_notes, 'DBICTest::LinerNotes', 'Prefetch returns correct class'); - is($cd[2]->{_inflated_column}{artist}->name, 'Caterwauler McCrae', 'Prefetch on parent object ok'); + is($cd[2]->artist->name, 'Caterwauler McCrae', 'Prefetch on parent object ok'); }, 1, 'prefetch ran only 1 select statement'); # test for partial prefetch via columns attr -my $cd = $schema->resultset('CD')->find(1, +my $cd; +$schema->is_executed_querycount( sub { + $cd = $schema->resultset('CD')->find(1, { columns => [qw/title artist artist.name/], join => { 'artist' => {} } } -); -is( $cd->artist->name, 'Caterwauler McCrae', 'single related column prefetched'); + ); + is( $cd->artist->name, 'Caterwauler McCrae', 'single related column prefetched'); +}, 1, 'manual prefetch ran only 1 select statement'); # start test for nested prefetch SELECT count my $tag; @@ -65,8 +68,8 @@ $schema->is_executed_querycount( sub { $cd = $schema->resultset('CD')->find(1, { prefetch => 'artist' }); - is($cd->{_inflated_column}{artist}->name, 'Caterwauler McCrae', 'artist prefetched correctly on find'); -}, 1, 'find with prefetch ran exactly 1 select statement (excluding column_info)'); + is($cd->artist->name, 'Caterwauler McCrae', 'artist prefetched correctly on find'); +}, 1, 'find with prefetch ran exactly 1 select statement'); $schema->is_executed_querycount( sub { $cd = $schema->resultset('CD')->find(1, { prefetch => { cd_to_producer => 'producer' }, order_by => 'producer.producerid' }); diff --git a/t/storage/replicated.t b/t/storage/replicated.t index ef84d82..341de7d 100644 --- a/t/storage/replicated.t +++ b/t/storage/replicated.t @@ -76,15 +76,16 @@ package DBIx::Class::DBI::Replicated::TestReplication; use DBICTest; - use base qw/Class::Accessor::Fast/; - - __PACKAGE__->mk_accessors( qw/schema/ ); + use base 'Class::Accessor::Grouped'; + + + __PACKAGE__->mk_group_accessors( simple => 'schema' ); ## Initialize the object sub new { my ($class, $schema_method) = (shift, shift); - my $self = $class->SUPER::new(@_); + my $self = bless( (shift || {}), $class ); $self->schema( $self->init_schema($schema_method) ); return $self; @@ -148,13 +149,12 @@ use File::Copy; use base 'DBIx::Class::DBI::Replicated::TestReplication'; - __PACKAGE__->mk_accessors(qw/master_path slave_paths/); + __PACKAGE__->mk_group_accessors( simple => qw( master_path slave_paths ) ); ## Set the master path from DBICTest sub new { - my $class = shift @_; - my $self = $class->SUPER::new(@_); + my $self = shift->next::method(@_); $self->master_path( DBICTest->_sqlite_dbfilename ); $self->slave_paths([