diff options
| author | fukachan <fukachan> | 2001-01-26 07:33:09 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-01-26 07:33:09 +0000 |
| commit | 314ac87743b2ae2581145df74ebb6ce812f7b708 (patch) | |
| tree | 52374cbea0a484e05cbe30e8488c2a104821f40f /fml/lib | |
| parent | 4bb8356b1eeaf80b4db5378a366d8a681faa207e (diff) | |
| download | fml8-314ac87743b2ae2581145df74ebb6ce812f7b708.tar.gz fml8-314ac87743b2ae2581145df74ebb6ce812f7b708.tar.bz2 fml8-314ac87743b2ae2581145df74ebb6ce812f7b708.zip | |
rename IO:: to Tie::
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/Tie/LogFileDB.pm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fml/lib/Tie/LogFileDB.pm b/fml/lib/Tie/LogFileDB.pm index 6759a60a..4f9face5 100644 --- a/fml/lib/Tie/LogFileDB.pm +++ b/fml/lib/Tie/LogFileDB.pm @@ -8,7 +8,7 @@ # $FML$ # -package IO::LogFileDB; +package Tie::LogFileDB; use strict; use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); @@ -118,20 +118,20 @@ sub _fetch =head1 NAME -IO::LogFileDB.pm - what is this +Tie::LogFileDB.pm - what is this =head1 SYNOPSIS - use IO::LogFileDB; - $db = new IO::LogFileDB { file => 'cache.txt' }; + use Tie::LogFileDB; + $db = new Tie::LogFileDB { file => 'cache.txt' }; # all entries with the key = 'rudo' @values = $db->grep( rudo ); or - use IO::LogFileDB; - tie %db, 'IO::LogFileDB', { file => 'cache.txt' }; + use Tie::LogFileDB; + tie %db, 'Tie::LogFileDB', { file => 'cache.txt' }; print $db{ rudo }, "\n"; where cache file "cache.txt" format is "key value" for each line. @@ -143,15 +143,15 @@ For example By default, FETCH() returns the first value with the key. - use IO::LogFileDB; - tie %db, 'IO::LogFileDB', { first_match => 1, file => 'cache.txt' }; + use Tie::LogFileDB; + tie %db, 'Tie::LogFileDB', { first_match => 1, file => 'cache.txt' }; print $db{ rudo }, "\n"; if you find the latest value (so at the later line somewhere in the file) for the $key - use IO::LogFileDB; - tie %db, 'IO::LogFileDB', { last_match => 1, file => 'cache.txt' }; + use Tie::LogFileDB; + tie %db, 'Tie::LogFileDB', { last_match => 1, file => 'cache.txt' }; print $db{ rudo }, "\n"; @@ -176,7 +176,7 @@ redistribute it and/or modify it under the same terms as Perl itself. =head1 HISTORY -IO::LogFileDB.pm appeared in fml5. +Tie::LogFileDB.pm appeared in fml5. =cut |
