I have a negatable option defined as top!.
When a command uses this option, say : command_name -top, prints a warning to the user
Code snippet for it is as follows :
if ($args{top}) { print "Warning"; }
Run Code Online (Sandbox Code Playgroud)
但是,当命令使用否定选项时,例如:command_name -notop,它不会向用户打印相同的警告。
有没有办法在这两种情况下获得相同的警告?