1package DBM_Filter::int32 ;
2
3use strict;
4use warnings;
5
6our $VERSION = '0.03';
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
26=head1 NAME
27
28DBM_Filter::int32 - filter for DBM_Filter
29
30=head1 SYNOPSIS
31
32    use SDBM_File; # or DB_File, GDBM_File, NDBM_File, or ODBM_File
33    use DBM_Filter ;
34
35    $db = tie %hash, ...
36    $db->Filter_Push('int32');
37
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
51