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 / int32.pm
CommitLineData
0e9b1cbd
PM
1package DBM_Filter::int32 ;
2
3use strict;
4use warnings;
5
7811227b 6our $VERSION = '0.03';
0e9b1cbd
PM
7
8# todo get Filter to figure endian.
9
10sub Store
11{
12 $_ = 0 if ! defined $_ || $_ eq "" ;
13 $_ = pack("i", $_);
14}
15
16sub Fetch
17{
18 no warnings 'uninitialized';
19 $_ = unpack("i", $_);
20}
21
221;
23
24__END__
25
b370a9eb
RGS
26=head1 NAME
27
28DBM_Filter::int32 - filter for DBM_Filter
0e9b1cbd
PM
29
30=head1 SYNOPSIS
31
555bd962 32 use SDBM_File; # or DB_File, GDBM_File, NDBM_File, or ODBM_File
0e9b1cbd
PM
33 use DBM_Filter ;
34
35 $db = tie %hash, ...
36 $db->Filter_Push('int32');
b370a9eb 37
0e9b1cbd
PM
38=head1 DESCRIPTION
39
40This DBM filter is used when interoperating with a C/C++ application
41that uses a C int as either the key and/or value in the DBM file.
42
43=head1 SEE ALSO
44
45L<DBM_Filter>, L<perldbmfilter>
46
47=head1 AUTHOR
48
49Paul Marquess pmqs@cpan.org
50