Env::Export - Export environment variables as constant subroutines Version: 0.20 WHAT IS IT This module allows the user to specify one or more environment variables that should be "exported" to the calling namespace as constant subroutines. By doing this, their existence/inexistence can be detected at compile-time. USING Env::Export The difference is in how you detect the absence of the environment variable you need: if (exists($ENV{PATH}) and ($ENV{PATH} =~ /.../)) { # Do something } versus: use Env::Export 'PATH'; if (PATH =~ /.../) { # Do something } The first form performs two tests, the first to ensure that the second does not cause a "Use of unitialized value in regular expression" warning. The second form only performs one test, but it also generates a compile-time error if there was no environment variable "PATH" present. BUILDING/INSTALLING This package provides a Makefile.PL file as is typical of CPAN modules. Building and installing is as easy as: perl Makefile.PL make make test # If tests pass make install (The "make install" step may require super-user privileges.) PROBLEMS/BUG REPORTS Problems, bug reports, or suggestions for enhancements can be sent directly to me, . Alternately, you can use the RT instance set up for all CPAN-based distributions: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Env-Export CHANGES * lib/Env/Export.pm * t/15_no_redefine.t (deleted) * t/20_regex.t (added) * t/25_glob.t (added) * t/30_prefix.t (added) * t/40_all.t (added) * t/50_warn.t (added) * t/60_override.t (added) * t/70_link.t (added) * t/80_split.t (added) * t/sub_count.pl (added) Added extensive new features and loads more tests. Better overall model for how the args list is processed into a series of newly-defined functions. The keywords ":all", ":prefix"/":noprefix", ":warn"/":nowarn", ":override"/":nooverride", ":link"/":nolink" and ":split" are now all implemented. Shell-style globbing patterns are acceptable as an alternative to regular expressions. Documentation extensively re-worked to cover all of this, and tests galore for all of these features. * t/10_basic.t * t/15_no_redefine.t Bring tests more in line with nature of the module.