Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 31588
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: banb [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08008
Fixed in: (no value)



Subject: t/73oracle_inflate.t failed at END clauses
In my circumstance (with Perl-5.8.8, Test::Harness 3.05, Test::More 0.74 , CPAN 1.9205 on CentOS 5), test script t/73oracle_inflate.t complains of failure, as follows. PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(1, 'inc', 'blib/lib', 'blib/arch')" t/73oracle_inflate.t t/73oracle_inflate...... 1..0 # Skip needs DateTime and DateTime::Format::Oracle for testing Can't call method "class" on an undefined value at t/73oracle_inflate.t line 59. END failed--call queue aborted. skipped: needs DateTime and DateTime::Format::Oracle for testing Test Summary Report ------------------- t/73oracle_inflate.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 All of CPAN tester reports indicated that message. Most of test reports ignored that status, but some of reports showed failure (as I'm reporting). http://cpantesters.perl.org/show/DBIx-Class.html#DBIx-Class-0.08008 I don't realize why only some testers report this failure. But the cause of that warnings is clear. In END { ... } block, $schema variable is used as if it would be initialized even if we skip the entire test. Following patch might work and seems to be harmless. --- t/73oracle_inflate.t.orig 2007-09-05 03:33:10.000000000 +0900 +++ t/73oracle_inflate.t 2007-12-17 11:59:13.000000000 +0900 @@ -55,7 +55,9 @@ # clean up our mess END { # Set the metadata back for the last_updated_on column - $schema->class('Track')->add_column( 'last_updated_on' => $col_metadata ); + if($schema) { + $schema->class('Track')->add_column( 'last_updated_on' => $col_metadata ); + } if($dbh) { $dbh->do("DROP TABLE track"); Regards.
From: itegebo [...] berkeley.edu
On Sun Dec 16 22:22:45 2007, BANB wrote: Show quoted text
> In my circumstance (with Perl-5.8.8, Test::Harness 3.05, Test::More 0.74 > , CPAN 1.9205 on CentOS 5), test script t/73oracle_inflate.t complains > of failure, as follows. > > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(1, 'inc', 'blib/lib', 'blib/arch')" t/73oracle_inflate.t > t/73oracle_inflate...... > 1..0 # Skip needs DateTime and DateTime::Format::Oracle for testing > Can't call method "class" on an undefined value at t/73oracle_inflate.t > line 59. > END failed--call queue aborted. > skipped: needs DateTime and DateTime::Format::Oracle for testing > > Test Summary Report > ------------------- > t/73oracle_inflate.t (Wstat: 512 Tests: 0 Failed: 0) > Non-zero exit status: 2 > > > All of CPAN tester reports indicated that message. > Most of test reports ignored that status, but some of reports showed > failure (as I'm reporting). > http://cpantesters.perl.org/show/DBIx-Class.html#DBIx-Class-0.08008 > > > I don't realize why only some testers report this failure. > > But the cause of that warnings is clear. In END { ... } block, $schema > variable is used as if it would be initialized even if we skip the > entire test. > > Following patch might work and seems to be harmless. > > --- t/73oracle_inflate.t.orig 2007-09-05 03:33:10.000000000 +0900 > +++ t/73oracle_inflate.t 2007-12-17 11:59:13.000000000 +0900 > @@ -55,7 +55,9 @@ > # clean up our mess > END { > # Set the metadata back for the last_updated_on column > - $schema->class('Track')->add_column( 'last_updated_on' => > $col_metadata ); > + if($schema) { > + $schema->class('Track')->add_column( 'last_updated_on' => > $col_metadata ); > + } > > if($dbh) { > $dbh->do("DROP TABLE track"); > > > Regards.
I can confirm this problem on: Linux 2.6.22-14-generic (5.8.8) The patch works for me also. -it
I saw this problem is fixed on 0.08009 release. Thank you.