mirror of
https://github.com/dani/patrix.git
synced 2024-06-18 04:39:14 +02:00
Define actions array before the loop
This commit is contained in:
parent
d99c85b77a
commit
7ba80c0dfe
|
@ -59,9 +59,19 @@ if ($opt->{conf} && -e $opt->{conf}){
|
||||||
}
|
}
|
||||||
|
|
||||||
# alias for --action=foo is --foo
|
# alias for --action=foo is --foo
|
||||||
foreach my $action (qw(send-msg send-notice send-file create-room modify-room
|
my @actions = qw(
|
||||||
delete-room-alias get-access-token get-room-list get-room-id
|
send-msg
|
||||||
setup)){
|
send-notice
|
||||||
|
send-file
|
||||||
|
create-room
|
||||||
|
modify-room
|
||||||
|
delete-room-alias
|
||||||
|
get-access-token
|
||||||
|
get-room-list
|
||||||
|
get-room-id
|
||||||
|
setup
|
||||||
|
);
|
||||||
|
foreach my $action (@actions){
|
||||||
if ($opt->{$action}){
|
if ($opt->{$action}){
|
||||||
$opt->{action} = $action;
|
$opt->{action} = $action;
|
||||||
last;
|
last;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user