[Dbix-class] using inject_base (was Backcompat tests for the dev version of DBIx::Class::Schema::Loader)

Zbigniew Lukasiak zzbbyy at gmail.com
Sat Sep 12 10:19:22 GMT 2009


Hi,

Continuing the backcompat work for Loader, as suggested at IRC, I
tried to use inject_base, but the documentation for it is rather
scarce and I don't seem to get the call right.  I added it to the
beginning of the test script - but then it seems that the ISA of
DBIx::Class::Schema::Loader::DBI is replaced instead of just having
one more value pushed on it:

package dbixcsl_backcompat;

use strict;
use warnings;

use Test::More;
use DBIx::Class::Schema::Loader::Compat::v0_040;
use File::Path;
use  Class::C3::Componentised;

use parent 'dbixcsl_common_tests';

Class::C3::Componentised->inject_base (
    'DBIx::Class::Schema::Loader::DBI',
    'DBIx::Class::Schema::Loader::Compat::v0_040',
);


-----------------
zby at zby:~/progs/bc$ perl -Ilib t/30backcompat.t
1..10
not ok 1 - Loader initialization
#   Failed test 'Loader initialization'
#   at t/lib/dbixcsl_backcompat.pm line 80.
# Can't locate object method "new" via package
"DBIx::Class::Schema::Loader::DBI" at lib/DBIx/Class/Schema/Loader.pm
line 161.


-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/



More information about the DBIx-Class mailing list