This just won't go away.
On Mon Aug 16 09:41:12 2010, RKITOVER wrote:
Show quoted text> Is that the full error message? The redefined message is just a
> warning. Please attach a test app/schema.
That is the full error message, and it dies.
I have already attached a tarball of test script with files that you can
drop into the build directory for 0.07001.
I just tried this:
1) removed perl, perl yum packages and /usr/lib/perl5
2) reinstalled perl yum package (5.8.8-32.el5_5.1)
3) reinstalled all libs from CPAN
3) updated every lib that came with yum that could be updated
Then I tried building from source package of 0.07001. All of the test
worked, except the one that I wrote and uploaded to this bug report
earlier. The result is the same. Every time it gets the namespace
right and finds a file-defined package in t/lib with extra methods, it
issues the redefined subroutine method and then dies.
Thanks. --mark--
hedges@vm1:~/src/DBIx-Class-Schema-Loader-0.07001$ prove -v
t/50addl_base_classes.t
t/50addl_base_classes.t ..
1..35
# DBIx::Class::Schema::Loader::Base says use_namespaces is the default
# In the first test run, then, Foo should be a
DBICTestMethods::Namespaces::Schema::Result::Foo
ok 1 - (naming => 'current') get schema
ok 2 - (naming => 'current') get a ResultSet for Foo
ok 3 - (naming => 'current') get the first foo
ok 4 - (naming => 'current') $foo is defined
# foo's class is DBICTestMethods::Namespaces::Schema::Foo
not ok 5 - (naming => 'current') $foo is a
DBICTestMethods::Namespaces::Schema::Result::Foo
# Failed test '(naming => 'current') $foo is a
DBICTestMethods::Namespaces::Schema::Result::Foo'
# at t/50addl_base_classes.t line 104.
not ok 6 - (naming => 'current') call the file-defined Foo->biz method
# Failed test '(naming => 'current') call the file-defined Foo->biz
method'
# at t/50addl_base_classes.t line 110.
# died: Can't locate object method "biz" via package
"DBICTestMethods::Namespaces::Schema::Foo" at t/50addl_base_classes.t
line 109.
ok 7 # skip no point in checking value if method was not found
# In the second test run with use_namespaces => 0 (backcompat), Foo
should be a DBICTestMethods::Backcompat::Schema
not ok 8 - (naming => 'current', use_namespaces => 0) get schema
# Failed test '(naming => 'current', use_namespaces => 0) get schema'
# at t/50addl_base_classes.t line 79.
# died: Failed to reload class DBICTestMethods::Backcompat::Schema::Foo:
Subroutine biz redefined at
/tmp/dbicyGEp/DBICTestMethods/Backcompat/Schema/Foo.pm line 90.
# Compilation failed in require at (eval 374) line 1.
ok 9 # skip no point in checking if schema could not be connected
ok 10 # skip no point in checking if schema could not be connected
ok 11 # skip no point in checking if schema could not be connected
ok 12 # skip no point in checking if schema could not be connected
ok 13 # skip no point in checking if schema could not be connected
ok 14 # skip no point in checking if schema could not be connected
# In the third test, with use_namespaces => 1, Foo gets the explicit
Result class again
not ok 15 - (naming => 'current', use_namespaces => 1) get schema
# Failed test '(naming => 'current', use_namespaces => 1) get schema'
# at t/50addl_base_classes.t line 79.
# died: Failed to reload class
DBICTestMethods::Namespaces::Schema::Result::Foo: Subroutine biz
redefined at
/tmp/dbicugSd/DBICTestMethods/Namespaces/Schema/Result/Foo.pm line 90.
# Compilation failed in require at (eval 395) line 1.
ok 16 # skip no point in checking if schema could not be connected
ok 17 # skip no point in checking if schema could not be connected
ok 18 # skip no point in checking if schema could not be connected
ok 19 # skip no point in checking if schema could not be connected
ok 20 # skip no point in checking if schema could not be connected
ok 21 # skip no point in checking if schema could not be connected
# try it in full backcompat 0.04006 mode with no schema options
Dynamic schema detected, will run in 0.04006 mode.
Set the 'naming' attribute or the SCHEMA_LOADER_BACKCOMPAT environment
variable
to disable this warning.
Also consider setting 'use_namespaces => 1' if/when upgrading.
See perldoc DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 for more
details.
not ok 22 - (no naming or namespaces options (0.04006 mode)) get schema
# Failed test '(no naming or namespaces options (0.04006 mode)) get
schema'
# at t/50addl_base_classes.t line 79.
# died: Failed to reload class DBICTestMethods::Backcompat::Schema::Foo:
Subroutine biz redefined at
/tmp/dbicY8Kk/DBICTestMethods/Backcompat/Schema/Foo.pm line 90.
# Compilation failed in require at (eval 421) line 1.
ok 23 # skip no point in checking if schema could not be connected
ok 24 # skip no point in checking if schema could not be connected
ok 25 # skip no point in checking if schema could not be connected
ok 26 # skip no point in checking if schema could not be connected
ok 27 # skip no point in checking if schema could not be connected
ok 28 # skip no point in checking if schema could not be connected
# try it in backcompat mode (no naming option) but with use_namespaces => 1
Dynamic schema detected, will run in 0.04006 mode.
Set the 'naming' attribute or the SCHEMA_LOADER_BACKCOMPAT environment
variable
to disable this warning.
Also consider setting 'use_namespaces => 1' if/when upgrading.
See perldoc DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 for more
details.
not ok 29 - (no naming or namespaces options (0.04006 mode)) get schema
# Failed test '(no naming or namespaces options (0.04006 mode)) get
schema'
# at t/50addl_base_classes.t line 79.
# died: Failed to reload class
DBICTestMethods::Namespaces::Schema::Result::Foo: Subroutine biz
redefined at
/tmp/dbic2o0C/DBICTestMethods/Namespaces/Schema/Result/Foo.pm line 90.
# Compilation failed in require at (eval 442) line 1.
ok 30 # skip no point in checking if schema could not be connected
ok 31 # skip no point in checking if schema could not be connected
ok 32 # skip no point in checking if schema could not be connected
ok 33 # skip no point in checking if schema could not be connected
ok 34 # skip no point in checking if schema could not be connected
ok 35 # skip no point in checking if schema could not be connected
# Looks like you failed 6 tests of 35.
Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/35 subtests
(less 25 skipped subtests: 4 okay)
Test Summary Report
-------------------
t/50addl_base_classes.t (Wstat: 1536 Tests: 35 Failed: 6)
Failed tests: 5-6, 8, 15, 22, 29
Non-zero exit status: 6
Files=1, Tests=35, 1 wallclock secs ( 0.01 usr 0.04 sys + 0.62 cusr
0.54 csys = 1.21 CPU)
Result: FAIL