Forum Discussion
warning: [variable reference used where variable name expected][${var}]
Hi All,
When performing a tmsh load sys config verify, I have the following warning message:
/Common/irule_reverse_proxy_v4.1:90: warning: [variable reference used where variable name expected][${var}] /Common/irule_reverse_proxy_v4.1:93: warning: [variable reference used where variable name expected][${var}] /Common/irule_reverse_proxy_v4.1:100: warning: [variable reference used where variable name expected][${var}] /Common/irule_reverse_proxy_v4.1:108: warning: [variable reference used where variable name expected][${var}]
The block responsible for these warnings in my iRule is:
89 foreach var { "do_host_rewrite" "do_requests_rewrite" "do_responses_rewrite" "rule_debug" }
90 {
91 set ${var} 0
92 if {[class search $datagroup equals $var]}
93 {
94 set ${var} [class match -value $var equals $datagroup]
95 }
96 }
This is NOT https://support.f5.com/kb/en-us/solutions/public/14000/500/sol14531
I tried the iRule with different version (11.6.0, 11.5.3 etc.)Is there something wrong with my syntax?
Thank you in advance for your help,
Regards,
1 Reply
- Stanislas_Piro2
Cumulonimbus
Hi Vitouz,
the right set command is:
set var 0or
set var [class match -value $var equals $datagroup]the
is to get value of the variable, not to set it.$
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com