+ -
当前位置:首页 → 问答吧 → File::Rsync 无法使用exclude-from 这类参数

File::Rsync 无法使用exclude-from 这类参数

时间:2010-09-25

来源:互联网

今天遇到个问题File::Rsync 无法使用exclude-from ,使用后会报如下错误!
下载 (8.55 KB)
2010-09-25 14:48

请问如何解决!

作者: panxinming90   发布时间: 2010-09-25

上个代码看看。

作者: shaneqi   发布时间: 2010-09-25

看到这么一段,应该是这里有问题吧?
  1. if ($tag) {
  2.             if (my $reftype = ref $opt->{$hashopt}) {
  3.                if ($reftype eq 'ARRAY') {
  4.                   $OPT{$tag} = $opt->{$hashopt};
  5.                } elsif ($tag eq 'source' && blessed $opt->{$hashopt}) {
  6.                   $OPT{$tag} = [ $opt->{$hashopt} ];
  7.                } else {
  8.                   carp "$pkgname: invalid reference type for $hashopt option";
  9.                   return;
  10.                }
  11.             } elsif ($tag eq 'source') {
  12.                $OPT{$tag} = [ $opt->{$hashopt} ];
  13.             } else {
  14.                carp "$pkgname: $hashopt is not a reference";
  15.                return;
  16.             }
  17.          }
复制代码

作者: shaneqi   发布时间: 2010-09-25

下载 (15.27 KB)
2010-09-25 15:59


代码如上,请问如何解决!

作者: panxinming90   发布时间: 2010-09-25

\%rsync_option,这样试试看看呢?

作者: shaneqi   发布时间: 2010-09-25

查看 Rsync.pm 修改 'exclude-from' => ['/opt/case/rsync_dir/md5/excludes.txt'], OK!

作者: panxinming90   发布时间: 2010-09-25