use warnings; use strict; my $v = 5; use constant { TEST => $v, }; print TEST; #### Use of uninitialized value in print at begin.pl line 10. #### my $v; BEGIN { $v = 5; } use constant { TEST => $v, }; print TEST; #### my $home_dir; # The %api_cache hash is a cache for API call data across all objects. # It is managed by the _api_cache() private method. Each cache slot contains the # time() that it was stored, and will time out after # API_CACHE_TIMEOUT_SECONDS/api_cache_time() my %api_cache; BEGIN { $home_dir = File::HomeDir->my_home; } use constant { DEBUG_CACHE => $ENV{DEBUG_API_CACHE}, API_CACHE_PERSIST => 0, API_CACHE_TIMEOUT_SECONDS => 2, API_TIMEOUT_RETRIES => 3, AUTH_CACHE_FILE => "$home_dir/api_auth_cache.json", };