New data for Unicode on older versions, thanks to Nicholas
[p5sagit/p5-mst-13.2.git] / lib / DBM_Filter / compress.pm
CommitLineData
0e9b1cbd 1package DBM_Filter::compress ;
2
3use strict;
4use warnings;
5use Carp;
6
7our $VERSION = '0.01';
8
9BEGIN
10{
11 eval { require Compress::Zlib; Compress::Zlib->import() };
12
13 croak "Compress::Zlib module not found.\n"
14 if $@;
15}
16
17
18
19sub Store { $_ = compress($_) }
20sub Fetch { $_ = uncompress($_) }
21
221;
23
24__END__
25
b370a9eb 26=head1 NAME
27
28DBM_Filter::compress - filter for DBM_Filter
0e9b1cbd 29
30=head1 SYNOPSIS
31
32 use SDBM_File; # or DB_File, or GDBM_File, or NDBM_File, or ODBM_File
33 use DBM_Filter ;
34
35 $db = tie %hash, ...
36 $db->Filter_Push('compress');
b370a9eb 37
0e9b1cbd 38=head1 DESCRIPTION
39
40This DBM filter will compress all data before it is written to the database
41and uncompressed it on reading.
42
43A fatal error will be thrown if the Compress::Zlib module is not
44available.
45
46=head1 SEE ALSO
47
48L<DBM_Filter>, L<perldbmfilter>, L<Compress::Zlib>
49
50=head1 AUTHOR
51
52Paul Marquess pmqs@cpan.org
53