use strict;
-use warnings;
+use warnings;
use Test::More;
use lib qw(t/lib);
my $schema = DBICTest->init_schema();
-use Data::Dumper;
-
my @serializers = (
{ module => 'YAML.pm',
inflater => sub { YAML::Load (shift) },
}
}
-plan (skip_all => "No suitable serializer found") unless $selected;
-
DBICTest::Schema::Serialized->inflate_column( 'serialized',
{ inflate => $selected->{inflater},
deflate => $selected->{deflater},
},
);
-Class::C3->reinitialize;
+Class::C3->reinitialize if DBIx::Class::_ENV_::OLD_MRO;
my $struct_hash = {
a => 1,
#======= testing hashref serialization
-my $object = $rs->create( {
+my $object = $rs->create( {
serialized => '',
} );
ok($object->update( { serialized => $struct_hash } ), 'hashref deflation');
ok($inflated = $object->serialized, 'hashref inflation');
is_deeply($inflated, $struct_hash, 'inflated hash matches original');
-$object = $rs->create( {
+$object = $rs->create( {
serialized => '',
} );
$object->set_inflated_column('serialized', $struct_hash);
);
#===== make sure make_column_dirty interacts reasonably with inflation
-$object = $rs->first;
+$object = $rs->search({}, { rows => 1 })->next;
$object->update ({serialized => { x => 'y'}});
$object->serialized->{x} = 'z'; # change state without notifying $object