This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
warnings: fix POD typo "you" → "your"
[perl5.git] / lib / DBM_Filter / null.pm
CommitLineData
0e9b1cbd
PM
1package DBM_Filter::null ;
2
3use strict;
4use warnings;
5
d705e9a3 6our $VERSION = '0.03';
0e9b1cbd
PM
7
8sub Store
9{
10 no warnings 'uninitialized';
11 $_ .= "\x00" ;
12}
13
14sub Fetch
15{
16 no warnings 'uninitialized';
17 s/\x00$// ;
18}
19
201;
21
22__END__
23
b370a9eb
RGS
24=head1 NAME
25
26DBM_Filter::null - filter for DBM_Filter
0e9b1cbd
PM
27
28=head1 SYNOPSIS
29
555bd962 30 use SDBM_File; # or DB_File, GDBM_File, NDBM_File, or ODBM_File
0e9b1cbd
PM
31 use DBM_Filter ;
32
33 $db = tie %hash, ...
34 $db->Filter_Push('null');
b370a9eb 35
0e9b1cbd
PM
36=head1 DESCRIPTION
37
38This filter ensures that all data written to the DBM file is null
39terminated. This is useful when you have a perl script that needs
40to interoperate with a DBM file that a C program also uses. A fairly
41common issue is for the C application to include the terminating null
42in a string when it writes to the DBM file. This filter will ensure that
43all data written to the DBM file can be read by the C application.
44
45
46=head1 SEE ALSO
47
48L<DBM_Filter>, L<perldbmfilter>
49
50=head1 AUTHOR
51
52Paul Marquess pmqs@cpan.org