Re: GetAccountRules syntax

От: Alexander Demidov <CGatePro_at_mx_ru>
Дата: Wed 04 Feb 2004 - 13:37:06 MSK

Здравствуйте!

> читаю документацию:
>
> GetAccountRules accountName
> Use this command to get the list of account Rules. The command
produces an
> output - an array of the Rules specified for the account.
>
> пишу:
>
> @acctData = $cli->GetAccountRules($user);
> print "$acctData[0]\n";
>
> не работает.
> Где не прав?

  http://www.stalker.com/CGPerl/

  my $Rules=$cli->GetAccountRules('john')

            || die "Error: ".$cli->getErrMessage.", quitting";

  foreach my $Rule (@$Rules) {
    my $conditions=$Rule->[2],$actions=$Rule->[3];     print "\nName='$Rule->[1]' Priority=$Rule->[0]\n";     print " If\n ";
    foreach my $cond (@$conditions) {

      print " $_ " foreach (@$cond);
      print "\n  ";

    }
    print "Then\n ";
    foreach my $actn (@$actions) {
      print " $_ " foreach (@$actn);
      print "\n  ";

    }
  }
---
Alexander Demidov, Zenon N.S.P. Technical support department.
+7-095-232-3736, St. Petersburg: +7-812-326-4468, http://www.zenon.net
Получено Wed Feb 04 10:39:49 2004

Этот архив был сгенерирован hypermail 2.1.8 : Tue 21 Feb 2006 - 03:14:42 MSK