in reply to Clean way to export all constants at once

What do you think of this?

The file with the constants:

use Readonly; Readonly $test1 => 'EEN'; Readonly $test2 => 'TWEE'; Readonly $test3 => 'DRIE'
And the file using these constants.
use strict; do 'test.pl'; print "$main::test1 $main::test2 $main::test3"; $main::test1 = 1;
If you don't mind not using the strict pragma, you can drop the $main:: on the imported constants.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics