Forum Discussion
Deb_Allen_18
Feb 22, 2006Historic F5 Account
Referencing a class with a variable
I'm wondering if I can reference a class with a variable?
Will the class reference below evaluate to $::myclass?
when HTTP_REQUEST {
set uri_discards myclass
if {[matchclass [HTTP::uri] starts_with $::{$uri_discards}]}{
discard
}
}
I also noticed that I don't get any errors loading up this rule, even though neither class "myclass" nor "uri_discards" exists, so I'm wondering how much classname verification I might need to perform using variables in this manner?
thanks
/deb
- Colin_Walker_12Historic F5 AccountThere's actually a tech tip about dynamically declaring class names here: Click here
- Deb_Allen_18Historic F5 Accountsweet, thanks!
- JCohenRet. EmployeeColin,
- hoolio
Cirrostratus
Hi Jason,
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects