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
1 package DBM_Filter::int32 ;
2
3 use strict;
4 use warnings;
5
6 our $VERSION = '0.03';
7
8 # todo get Filter to figure endian.
9
10 sub Store
11 {
12     $_ = 0 if ! defined $_ || $_ eq "" ;
13     $_ = pack("i", $_);
14 }
15
16 sub Fetch
17 {
18     no warnings 'uninitialized';
19     $_ = unpack("i", $_);
20 }
21
22 1;
23
24 __END__
25
26 =head1 NAME
27
28 DBM_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
40 This DBM filter is used when interoperating with a C/C++ application
41 that uses a C int as either the key and/or value in the DBM file.
42
43 =head1 SEE ALSO
44
45 L<DBM_Filter>, L<perldbmfilter>
46
47 =head1 AUTHOR
48
49 Paul Marquess pmqs@cpan.org
50