summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-02-03 04:15:32 +0000
committerfukachan <fukachan>2004-02-03 04:15:32 +0000
commita7902cc336e4fa4e958cab31a70ae5aa924e566e (patch)
tree6e034f109aba6d3dbc673078a86267131c1803ce /fml/lib
parentd86e42b1d1023bf0635f885e384b7a114529e5a9 (diff)
downloadfml8-a7902cc336e4fa4e958cab31a70ae5aa924e566e.tar.gz
fml8-a7902cc336e4fa4e958cab31a70ae5aa924e566e.tar.bz2
fml8-a7902cc336e4fa4e958cab31a70ae5aa924e566e.zip
fix meta escape needed in finding key.
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/IO/Adapter.pm8
-rw-r--r--fml/lib/IO/Adapter/File.pm3
2 files changed, 8 insertions, 3 deletions
diff --git a/fml/lib/IO/Adapter.pm b/fml/lib/IO/Adapter.pm
index 61bafed0..e58e2e87 100644
--- a/fml/lib/IO/Adapter.pm
+++ b/fml/lib/IO/Adapter.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Adapter.pm,v 1.27 2003/08/23 04:35:43 fukachan Exp $
+# $FML: Adapter.pm,v 1.28 2004/01/24 09:03:55 fukachan Exp $
#
package IO::Adapter;
@@ -410,6 +410,9 @@ sub find
return $self->md_find($regexp, $args);
}
+ # we may need quote for special address e.g. a+b@domain.
+ $regexp = quotemeta($regexp);
+
# What we want, key or key+value ?
if (defined $args->{ want }) {
if ($args->{ want } eq 'key' ||
@@ -422,7 +425,8 @@ sub find
}
# search regexp by reading the specified map.
- my (@buf, $x);
+ my (@buf) = ();
+ my $x = '';
$self->open;
my $fp = $want eq 'key' ? 'get_next_key' : 'getline';
diff --git a/fml/lib/IO/Adapter/File.pm b/fml/lib/IO/Adapter/File.pm
index 587b413e..c286f443 100644
--- a/fml/lib/IO/Adapter/File.pm
+++ b/fml/lib/IO/Adapter/File.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: File.pm,v 1.50 2003/11/27 04:26:09 fukachan Exp $
+# $FML: File.pm,v 1.51 2004/01/24 09:03:56 fukachan Exp $
#
package IO::Adapter::File;
@@ -444,6 +444,7 @@ sub delete
my $wh = $self->{ _wh };
if (defined $fh) {
+ my $key = quotemeta($key);
my $buf;
FILE_IO: