in reply to Using variables in top level script inside the perl modules
I don't want to pass this variable from foo.pl
Why not? By accessing or manipulating the variable as a global variable it can be very difficult to determine where the value comes from and when or why it changes. By explicitly passing the value in as an argument to a sub or constructor it is much easier to manage and debug the code relating to it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using variables in top level script inside the perl modules
by alih110 (Novice) on Nov 06, 2008 at 09:32 UTC | |
by almut (Canon) on Nov 06, 2008 at 11:01 UTC | |
by GrandFather (Saint) on Nov 06, 2008 at 09:37 UTC |