From 8e0d482c7779a374aee4b4c6568edbbf3d21e7a5 Mon Sep 17 00:00:00 2001 From: fukachan Date: Sun, 15 Apr 2001 09:09:03 +0000 Subject: check IO::MapAdapter::find() --- regress/base/search.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 regress/base/search.pl diff --git a/regress/base/search.pl b/regress/base/search.pl new file mode 100755 index 00000000..a5e2312e --- /dev/null +++ b/regress/base/search.pl @@ -0,0 +1,26 @@ +#!/usr/local/bin/perl +#-*- perl -*- +# +# Copyright (C) 2001 Ken'ichi Fukamachi +# All rights reserved. This program is free software; you can +# redistribute it and/or modify it under the same terms as Perl itself. +# +# $FML: copy.pl,v 1.3 2001/04/03 09:51:12 fukachan Exp $ +# + +use IO::MapAdapter; + +my $map = shift || 'file:/var/spool/ml/elena/actives'; +my $obj = new IO::MapAdapter $map; + +$obj->open || croak("cannot open $map"); +while ($x = $obj->getline) { print "<< ", $x if $x =~ /\S+/;} +print "\n"; +$obj->close; + +for ('rudo', 'fukachan') { + print "* search $_ in $map\n"; + print $obj->find($_), "\n"; +} + +exit 0; -- cgit v1.2.1