1N/Apackage DBM_Filter::utf8 ;
1N/A
1N/Ause strict;
1N/Ause warnings;
1N/Ause Carp;
1N/A
1N/Aour $VERSION = '0.01';
1N/A
1N/ABEGIN
1N/A{
1N/A eval { require Encode; };
1N/A
1N/A croak "Encode module not found.\n"
1N/A if $@;
1N/A}
1N/A
1N/Asub Store { $_ = Encode::encode_utf8($_) if defined $_ }
1N/A
1N/Asub Fetch { $_ = Encode::decode_utf8($_) if defined $_ }
1N/A
1N/A1;
1N/A
1N/A__END__
1N/A
1N/A=head1 DBM_Filter::utf8
1N/A
1N/A=head1 SYNOPSIS
1N/A
1N/A use SDBM_File; # or DB_File, or GDBM_File, or NDBM_File, or ODBM_File
1N/A use DBM_Filter ;
1N/A
1N/A
1N/A $db = tie %hash, ...
1N/A $db->Filter_Push('utf8');
1N/A
1N/A=head1 DESCRIPTION
1N/A
1N/AThis Filter will ensure that all data written to the DBM will be encoded
1N/Ain UTF-8.
1N/A
1N/AThis module uses the Encode module.
1N/A
1N/A=head1 SEE ALSO
1N/A
1N/AL<DBM_Filter>, L<perldbmfilter>, L<Encode>
1N/A
1N/A=head1 AUTHOR
1N/A
1N/APaul Marquess pmqs@cpan.org
1N/A