1 use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
8 use lib 't/cdbi/testlib';
19 my($self, $key, $val) = @_;
21 return $self->{$key} = $val;
25 my $film = Film->create({ Title => "No Wolf McQuade" });
27 # Test mk_group_accessors() with a list of fields.
29 Film->mk_group_accessors(test => qw(foo bar));
38 # An explicit accessor passed to mk_group_accessors should
39 # ignore accessor/mutator_name_for.
40 sub Film::accessor_name_for {
41 my($class, $col) = @_;
42 return "hlaglagh" if $col eq "wibble";
46 sub Film::mutator_name_for {
47 my($class, $col) = @_;
48 return "hlaglagh" if $col eq "wibble";
53 # Test with a mix of fields and field specs
55 Film->mk_group_accessors(test => ("baz", [wibble_thing => "wibble"]));
59 $film->wibble_thing(23);
60 is $film->wibble_thing, 23;