If you want to create a package global variable that is private, you should use 'my', not 'our', as 'our' will expose the variable to external tampering. Really, though, I'm not particularly fond of your idiom of setting global parameters that effect the behavior of other subroutines. This creates a level of indirection that will make debugging more difficult. I would instead favor an idiom of having your process_search subroutine take multiple arguments, having each of your specific search functions pass along the search that was handed to them, as well as pass along some parameters the control the behavior of your general process_search function. This makes your program behavior more functional, eliminating confusing and unnecesary state information from the class.
In reply to Re: Package-Level Variables
by skyknight
in thread Package-Level Variables
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |