in reply to Re^3: Unclear about 'our'
in thread Unclear about 'our'
In your package foo above, my inclination would be to declare 'my $bar;' at the top, before the first sub, and simply refer to it as '$bar', if there were no need for users in other packages to access it.
In retrospect, I think using getters and setters is probably better than exposing variables.
Thanks for your efforts to clear this up for me.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Unclear about 'our'
by haukex (Archbishop) on Dec 28, 2022 at 15:28 UTC | |
by ibm1620 (Hermit) on Dec 28, 2022 at 17:24 UTC | |
by haukex (Archbishop) on Dec 28, 2022 at 17:36 UTC | |
by karlgoethebier (Abbot) on Dec 30, 2022 at 18:09 UTC |