summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-01-21 03:41:27 +0000
committerfukachan <fukachan>2004-01-21 03:41:27 +0000
commit0692487963c45df904fe56330834013d587ebacc (patch)
tree9c69bb1d600af56fc93c53926613dac2bdb19e09 /fml
parentbfc7b6b3f232b3e66f77d89a0c707eea31456e98 (diff)
downloadfml8-0692487963c45df904fe56330834013d587ebacc.tar.gz
fml8-0692487963c45df904fe56330834013d587ebacc.tar.bz2
fml8-0692487963c45df904fe56330834013d587ebacc.zip
define $number_regexp , $address_regexp.
modified to use it.
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/Restriction/Base.pm17
1 files changed, 12 insertions, 5 deletions
diff --git a/fml/lib/FML/Restriction/Base.pm b/fml/lib/FML/Restriction/Base.pm
index 46774c95..13dcade2 100644
--- a/fml/lib/FML/Restriction/Base.pm
+++ b/fml/lib/FML/Restriction/Base.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Base.pm,v 1.25 2003/10/15 01:03:36 fukachan Exp $
+# $FML: Base.pm,v 1.26 2004/01/02 14:42:44 fukachan Exp $
#
package FML::Restriction::Base;
@@ -94,12 +94,14 @@ my $command_regexp = '[-A-Za-z0-9_]+';
my $file_regexp = '[-A-Za-z0-9_]+';
my $dir_regexp = '[-A-Za-z0-9_]+';
my $option_regexp = '[-A-Za-z0-9]+';
+my $number_regexp = '\d+';
+my $address_regexp = sprintf("%s\@%s", $user_regexp, $domain_regexp);
my %basic_variable =
(
# address, user and domain et.al.
- 'address' => $user_regexp.'\@'.$domain_regexp,
- 'address_specified' => $user_regexp.'\@'.$domain_regexp,
- 'address_selected' => $user_regexp.'\@'.$domain_regexp,
+ 'address' => $address_regexp,
+ 'address_specified' => $address_regexp,
+ 'address_selected' => $address_regexp,
'domain' => $domain_regexp,
'user' => $user_regexp,
'ml_name' => $user_regexp,
@@ -109,7 +111,7 @@ my %basic_variable =
'action' => $command_regexp,
'command' => $command_regexp,
'navi_command' => $command_regexp,
- 'article_id' => '\d+',
+ 'article_id' => $number_regexp,
# file, directory et.al.
'directory' => $dir_regexp,
@@ -124,6 +126,11 @@ my %basic_variable =
);
+#
+# XXX-TODO: remove methods except for regexp_match() ???
+#
+
+
=head2 basic_variable()
return basic variable regexp list as HASH_REF.