A set of options derived from GetOpt::Long is generally global in some sense. They could be attached to a package variable, but it's usually not necessary to have each class instance carry its own reference to the options. The exception would be if an instance might modify an option for its own use. For that, local may be of more use than carrying the reference.
I don't see anything wrong with your dereferencing that won't be cleared up with a little refinement of your design. It's often worth while to call GetOptions() in a BEGIN block to make the options visible at compile time.
After Compline,
Zaxo
In reply to Re: creating references
by Zaxo
in thread creating references
by lilphil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |