Skip Menu |

This queue is for tickets about the Catalyst-Model-DBIC-Schema CPAN distribution.

Report information
The Basics
Id: 94599
Status: resolved
Priority: 0/
Queue: Catalyst-Model-DBIC-Schema

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.61
Fixed in: 0.63

Attachments
0001-Adjust-test-to-Data-Dumer-2.151.patch



Subject: t/08helper.t 'constraint loader arg as string' test fails
I experience this test failing: t/08helper.t ........................ 1/? # Failed test 'constraint loader arg as string' # at t/08helper.t line 79. # got: 'qr/^(foo|bar)$/' # expected: 'qr/(?^:^(foo|bar)$)/' # Looks like you failed 1 test of 45. t/08helper.t ........................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/45 subtests It happens with version 0.61 as well as with latest git version. I checked CPAN smokers reports, but t/08helper.t is always skipped there because of missing Catalyst::Helper.
CC: undisclosed-recipients:;
Subject: Re: [rt.cpan.org #94599] t/08helper.t 'constraint loader arg as string' test fails
Date: Thu, 10 Apr 2014 14:10:30 +0200
To: bug-Catalyst-Model-DBIC-Schema [...] rt.cpan.org
From: ilmari [...] ilmari.org (Dagfinn Ilmari Mannsåker)
"Petr Pisar via RT" <bug-Catalyst-Model-DBIC-Schema@rt.cpan.org> writes: Show quoted text
> I experience this test failing: > > t/08helper.t ........................ 1/? > # Failed test 'constraint loader arg as string' > # at t/08helper.t line 79. > # got: 'qr/^(foo|bar)$/' > # expected: 'qr/(?^:^(foo|bar)$)/' > # Looks like you failed 1 test of 45. > t/08helper.t ........................ Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/45 subtests > > It happens with version 0.61 as well as with latest git version. > > I checked CPAN smokers reports, but t/08helper.t is always skipped > there because of missing Catalyst::Helper.
I cannot reproduce this. Which versions of Catalyst::Helper, DBIx::Class::Schema::Loader, perl and Data::Dumper have you got? -- "The surreality of the universe tends towards a maximum" -- Skud's Law "Never formulate a law or axiom that you're not prepared to live with the consequences of." -- Skud's Meta-Law
Subject: Re: [rt.cpan.org #94599] t/08helper.t 'constraint loader arg as string' test fails
Date: Thu, 10 Apr 2014 14:23:35 +0200
To: (Dagfinn Ilmari Mannsåker) via RT <bug-Catalyst-Model-DBIC-Schema [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Thu, Apr 10, 2014 at 08:10:50AM -0400, (Dagfinn Ilmari Mannsåker) via RT wrote: Show quoted text
> "Petr Pisar via RT" <bug-Catalyst-Model-DBIC-Schema@rt.cpan.org> writes:
> > t/08helper.t ........................ 1/? > > # Failed test 'constraint loader arg as string' > > # at t/08helper.t line 79. > > # got: 'qr/^(foo|bar)$/' > > # expected: 'qr/(?^:^(foo|bar)$)/' > > # Looks like you failed 1 test of 45. > > t/08helper.t ........................ Dubious, test returned 1 (wstat 256, 0x100)
[...] Show quoted text
> I cannot reproduce this. Which versions of Catalyst::Helper, > DBIx::Class::Schema::Loader, perl and Data::Dumper have you got? >
Catalyst::Helper 1.37 DBIx::Class::Schema::Loader 0.07033 Data::Dumper 2.151 perl 5.18.2 I have logs from time when the test passed, but there are dozens of changed distributions, so it will take some time until I find where the cause is. -- Petr
Download (untitled)
application/pgp-signature 230b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #94599] t/08helper.t 'constraint loader arg as string' test fails
Date: Thu, 10 Apr 2014 14:29:17 +0200
To: (Dagfinn Ilmari Mannsåker) via RT <bug-Catalyst-Model-DBIC-Schema [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Thu, Apr 10, 2014 at 08:10:50AM -0400, (Dagfinn Ilmari Mannsåker) via RT wrote: Show quoted text
> > I cannot reproduce this. Which versions of Catalyst::Helper, > DBIx::Class::Schema::Loader, perl and Data::Dumper have you got? >
Thank for the tip. It's due to Data-Dumper update from 2.145 to 2.151. -- Petr
Download (untitled)
application/pgp-signature 230b

Message body not shown because it is not plain text.

CC: undisclosed-recipients:;
Subject: Re: [rt.cpan.org #94599] t/08helper.t 'constraint loader arg as string' test fails
Date: Thu, 10 Apr 2014 14:33:30 +0200
To: bug-Catalyst-Model-DBIC-Schema [...] rt.cpan.org
From: ilmari [...] ilmari.org (Dagfinn Ilmari Mannsåker)
"Petr Pisar via RT" <bug-Catalyst-Model-DBIC-Schema@rt.cpan.org> writes: Show quoted text
> Queue: Catalyst-Model-DBIC-Schema > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=94599 > > > On Thu, Apr 10, 2014 at 08:10:50AM -0400, (Dagfinn Ilmari Mannsåker) via RT wrote:
>> "Petr Pisar via RT" <bug-Catalyst-Model-DBIC-Schema@rt.cpan.org> writes:
>> > t/08helper.t ........................ 1/? >> > # Failed test 'constraint loader arg as string' >> > # at t/08helper.t line 79. >> > # got: 'qr/^(foo|bar)$/' >> > # expected: 'qr/(?^:^(foo|bar)$)/' >> > # Looks like you failed 1 test of 45. >> > t/08helper.t ........................ Dubious, test returned 1 (wstat 256, 0x100)
> [...]
>> I cannot reproduce this. Which versions of Catalyst::Helper, >> DBIx::Class::Schema::Loader, perl and Data::Dumper have you got?
[…] Show quoted text
> Data::Dumper 2.151
I had 2.145 before, and upgrading this made it break for me, because Data::Dumper changed how it dumps regexes. -- "I use RMS as a guide in the same way that a boat captain would use a lighthouse. It's good to know where it is, but you generally don't want to find yourself in the same spot." - Tollef Fog Heen
From: ppisar [...] redhat.com
Dne Čt 10.dub.2014 03:57:48, ppisar napsal(a): Show quoted text
> I experience this test failing: > > t/08helper.t ........................ 1/? > # Failed test 'constraint loader arg as string' > # at t/08helper.t line 79. > # got: 'qr/^(foo|bar)$/' > # expected: 'qr/(?^:^(foo|bar)$)/' > # Looks like you failed 1 test of 45. > t/08helper.t ........................ Dubious, test returned 1 (wstat > 256, 0x100) > Failed 1/45 subtests >
Provided the $i->helper->{loader_args}{constraint} format is not an API, one can tune the test like in the attached patch. Actually there has already been one tune similar. -- Petr
Subject: 0001-Adjust-test-to-Data-Dumer-2.151.patch
From 13325b238c8c1b854a14e9c5a9a270b16b87614d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Fri, 11 Apr 2014 16:05:40 +0200 Subject: [PATCH] Adjust test to Data-Dumer-2.151 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Data-Dumper-2.151 changed regular expression Dumper format: Before: $ perl -MData::Dumper -e '$q=qr/^(foo|bar)$/; print $q, qq{\n}; print Dumper($q)' (?^:^(foo|bar)$) $VAR1 = qr/(?^:^(foo|bar)$)/; After: $ perl -MData::Dumper -e '$q=qr/^(foo|bar)$/; print $q, qq{\n}; print Dumper($q)' (?^:^(foo|bar)$) $VAR1 = qr/^(foo|bar)$/; Signed-off-by: Petr Písař <ppisar@redhat.com> --- t/08helper.t | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/t/08helper.t b/t/08helper.t index 09ae5eb..31de2bd 100644 --- a/t/08helper.t +++ b/t/08helper.t @@ -9,6 +9,7 @@ use Test::Exception; use Catalyst::Helper::Model::DBIC::Schema; use Storable 'dclone'; use Test::Requires qw(Catalyst::Helper DBIx::Class::Schema::Loader); +require Data::Dumper; my $helper = Catalyst::Helper->new; $helper->{base} = $Bin; @@ -72,12 +73,15 @@ $i = instance(args => [$static, q{components=TimeStamp,Foo}]); is_deeply $i->components, ['InflateColumn::DateTime', 'TimeStamp', 'Foo'], 'two extra components'; -my $flags = qr// =~ /\^/ ? '^' : "-xism"; +my $expected_dumper_output = qq{qr/^(foo|bar)\$/}; +if ($Data::Dumper::VERSION < 2.151) { + my $flags = qr// =~ /\^/ ? '^' : "-xism"; + $expected_dumper_output = qq{qr/(?$flags:^(foo|bar)\$)/}; +} $i = instance(args => [$static, q{constraint=^(foo|bar)$}]); is $i->loader_args->{constraint}, qr/^(foo|bar)$/, 'constraint loader arg'; -is $i->helper->{loader_args}{constraint}, - qq{qr/(?$flags:^(foo|bar)\$)/}, +is $i->helper->{loader_args}{constraint}, $expected_dumper_output, 'constraint loader arg as string'; $i = instance(args => [$static, q{exclude=^(foo|bar)$}]); -- 1.9.0
I've fixed this slightly differently (and more robustly), by parsing the actual Data::Dumper return value for an empty regex, so it should be robust against future changes in serialisation. https://github.com/perl-catalyst/Catalyst-Model-DBIC-Schema/commit/d71aa88946cf1c2b213af5a7e42898365983a8a0
Released in version 0.63.