in reply to How to call a perl function without its context?
- use 'use strict;' in your sources, to ensure no auto-declarations are allowed.
- avoid global variables where possible and use 'use constant;' for the cases where you want a global constant like pi to be immutable and ubiquitously available.
- use classes (and possibly Moo) to reduce the need for randomly scoped identifiers and to manage the scope and access to attributes.
One world, one people
|
|---|