18 return bless [$value, $state], $class;
23 $self->[1] = ! $self->[1];
25 utf8::downgrade($self->[0]);
27 utf8::upgrade($self->[0]);
33 foreach my $t ("ASCII", "B\366se") {
34 my $length = length $t;
37 tie $u, 'UTF8Toggle', $t;
38 is (length $u, $length, "length of '$t'");
39 is (length $u, $length, "length of '$t'");
40 is (length $u, $length, "length of '$t'");
41 is (length $u, $length, "length of '$t'");
46 use open qw( :utf8 :std );
49 return bless {}, shift;
55 is ref(tied($t)), 'Tìè::UTF8', "Tie'ing to a UTF8 package works.";
58 local $::TODO = "Need more tests!";