[Bast-commits] r9123 - DBIx-Class/0.08/trunk/lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sun Apr 11 17:32:18 GMT 2010
Author: ribasushi
Date: 2010-04-11 18:32:18 +0100 (Sun, 11 Apr 2010)
New Revision: 9123
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Componentised.pm
Log:
Warn about both UTF8Columns and ForceUTF8 when loaded improperly
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Componentised.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Componentised.pm 2010-04-11 17:28:54 UTC (rev 9122)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Componentised.pm 2010-04-11 17:32:18 UTC (rev 9123)
@@ -15,22 +15,29 @@
my ($target, @complist) = @_;
# we already did load the component
- my $keep_checking = ! $target->isa ('DBIx::Class::UTF8Columns');
+ my $keep_checking = ! (
+ $target->isa ('DBIx::Class::UTF8Columns')
+ ||
+ $target->isa ('DBIx::Class::ForceUTF8')
+ );
- my @target_isa = do { no strict 'refs'; @{"$target\::ISA"} };
- my $base_store_column;
+ my (@target_isa, $base_store_column);
while ($keep_checking && @complist) {
+ @target_isa = do { no strict 'refs'; @{"$target\::ISA"} }
+ unless @target_isa;
+
my $comp = pop @complist;
- if ($comp->isa ('DBIx::Class::UTF8Columns')) {
+ if ($comp->isa ('DBIx::Class::UTF8Columns') || $comp->isa ('DBIx::Class::ForceUTF8') {
$keep_checking = 0;
$base_store_column ||=
do { require DBIx::Class::Row; DBIx::Class::Row->can ('store_column') };
+
my @broken;
for my $existing_comp (@target_isa) {
my $sc = $existing_comp->can ('store_column')
More information about the Bast-commits
mailing list