summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/FileUtils.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-01-25 09:14:04 +0000
committerfukachan <fukachan>2003-01-25 09:14:04 +0000
commita43a66146f737a410a9b8008d4d3eccb9308fc8f (patch)
treeedf8577f08dc0121b07024dc929b1219dd99281a /fml/lib/FML/Command/FileUtils.pm
parentcd4628ec752ca82dcee613bafada957c18d0501c (diff)
downloadfml8-a43a66146f737a410a9b8008d4d3eccb9308fc8f.tar.gz
fml8-a43a66146f737a410a9b8008d4d3eccb9308fc8f.tar.bz2
fml8-a43a66146f737a410a9b8008d4d3eccb9308fc8f.zip
implement FML::Restriction::Base::regexp_match() and
switched to use it.
Diffstat (limited to 'fml/lib/FML/Command/FileUtils.pm')
-rw-r--r--fml/lib/FML/Command/FileUtils.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/fml/lib/FML/Command/FileUtils.pm b/fml/lib/FML/Command/FileUtils.pm
index 44b30416..cc0696b7 100644
--- a/fml/lib/FML/Command/FileUtils.pm
+++ b/fml/lib/FML/Command/FileUtils.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: FileUtils.pm,v 1.9 2003/01/03 07:05:05 fukachan Exp $
+# $FML: FileUtils.pm,v 1.10 2003/01/11 16:05:14 fukachan Exp $
#
package FML::Command::FileUtils;
@@ -85,7 +85,7 @@ sub remove
my $is_error = 0;
# regexp allowed here for file
- my $file_regexp = $self->{ _safe }->regexp( 'file' );
+ my $safe = $self->{ _safe };
# chdir $ml_home_dir firstly. return ASAP if failed.
my $ml_home_dir = $config->{ ml_home_dir };
@@ -93,7 +93,7 @@ sub remove
for my $file (@$argv) {
# If $file is a safe pattern, o.k. Try to remove it!
- if ($file =~ /^$file_regexp$/) {
+ if ($safe->regexp_match('file', $file)) {
if (-f $file) {
unlink $file;