Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / lib / perl5 / 5.8.8 / DBM_Filter / int32.pm
CommitLineData
920dae64
AT
1package DBM_Filter::int32 ;
2
3use strict;
4use warnings;
5
6our $VERSION = '0.01';
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 DBM_Filter::int32
27
28=head1 SYNOPSIS
29
30 use SDBM_File; # or DB_File, or GDBM_File, or NDBM_File, or ODBM_File
31 use DBM_Filter ;
32
33 $db = tie %hash, ...
34 $db->Filter_Push('int32');
35
36=head1 DESCRIPTION
37
38This DBM filter is used when interoperating with a C/C++ application
39that uses a C int as either the key and/or value in the DBM file.
40
41=head1 SEE ALSO
42
43L<DBM_Filter>, L<perldbmfilter>
44
45=head1 AUTHOR
46
47Paul Marquess pmqs@cpan.org
48