Class-Persist
view release on metacpan or search on metacpan
$got = $all[0];
$colour = $got->Colour();
is(length $colour, 2, "2 char");
is(ord $colour, ord " ", "1st char is a space");
is(ord (substr $colour, 1), $ord, "2nd char is chr $ord");
$test->delete();
}
my $latin = "bl".chr(233)."u"; # e-acute;
my $unicode = "bl".chr(195).chr(169)."u";
use Encode; Encode::_utf8_on($unicode);
ok( my $test = Tuit->new({ Colour => $latin }), "created utf8 object" );
ok( $test->store, "stored" );
ok( Tuit->load( Colour => $latin ), "retrieved based on colour" );
ok( Tuit->load( Colour => $unicode ), "retrieved based on colour" );
use Storable qw( nfreeze thaw );
my $brain = { pie => 'tasty', buffy => 'pony' };
ok( my $frozen_brains = nfreeze( $brain ), "frozen brains" );
ok( my $head = Limb->new, "got a new head" );
ok( $head->brain_contents( $frozen_brains ), "set brain_contents" );
ok( $head->store, "stored" );
ok( my $other_head = Limb->load( $head->oid ), "got anotther copy of the head" );
ok( my $test_brains = thaw( $head->brain_contents ), "thawed brains" );
( run in 0.437 second using v1.01-cache-2.11-cpan-88abd93f124 )