1 package # hide from PAUSE
2 DBIx::Class::Componentised;
7 use base 'Class::C3::Componentised';
8 use Carp::Clan qw/^DBIx::Class|^Class::C3::Componentised/;
11 # this warns of subtle bugs introduced by UTF8Columns hacky handling of store_column
16 my @present_components = (@{mro::get_linear_isa ($target)||[]});
17 shift @present_components; # don't need to interrogate myself
20 for my $comp (reverse @_) {
22 # if we are trying add a UTF8Columns component *for the first time*
23 if ($comp->isa ('DBIx::Class::UTF8Columns') && ! $target->isa ('DBIx::Class::UTF8Columns') ) {
27 for (@present_components) {
28 last if $_ eq 'DBIx::Class::Row'; # don't care about anything further down the chain
30 my $cref = $_->can ('store_column')
33 push @broken, $_ if B::svref_2object($cref)->STASH->NAME eq $_;
36 carp "Incorrect loading order of $comp by ${target} will affect other components overriding store_column ("
37 . join (', ', @broken)
38 .'). Refer to the documentation of DBIx::Class::UTF8Columns for more info'
42 unshift @present_components, $comp;
45 $class->next::method($target, @_);