@quarantinesupport@# define modules runtine quarantine configuration
@quarantinesupport@@setquarvars@ENV['MODULES_RUN_QUARANTINE'] = '@RUN_QUARANTINE@'
@quarantinesupport@@setquarvars@@ENV['RUNENV_VAR'] = 'RUNENV_VAL'@
@quarantinesupport@@notsetquarvars@#ENV['MODULES_RUN_QUARANTINE'] = 'ENVVARNAME'
@quarantinesupport@@notsetquarvars@
@quarantinesupport@# setup quarantine if defined
@quarantinesupport@_mlre = ''
@quarantinesupport@if ENV.has_key?('MODULES_RUN_QUARANTINE') then
@quarantinesupport@   ENV['MODULES_RUN_QUARANTINE'].split(' ').each do |_mlv|
@quarantinesupport@      if _mlv =~ /^[A-Za-z_][A-Za-z0-9_]*$/ then
@quarantinesupport@         if ENV.has_key?(_mlv) then
@quarantinesupport@            _mlre << _mlv + "_modquar='" + ENV[_mlv].to_s + "' "
@quarantinesupport@         end
@quarantinesupport@         _mlrv = 'MODULES_RUNENV_' + _mlv
@quarantinesupport@         _mlre << _mlv + "='" + ENV[_mlrv].to_s + "' "
@quarantinesupport@      end
@quarantinesupport@   end
@quarantinesupport@   unless _mlre.empty?
@quarantinesupport@      _mlre = 'env ' + _mlre
@quarantinesupport@   end
@quarantinesupport@end
@quarantinesupport@
# define module command and surrounding initial environment (default value
# for MODULESHOME, MODULEPATH, LOADEDMODULES and parse of init config files)
@quarantinesupport@eval `#{_mlre}@TCLSH@ @libexecdir@/modulecmd.tcl ruby autoinit`
@notquarantinesupport@eval `@TCLSH@ @libexecdir@/modulecmd.tcl ruby autoinit`
@compatversion@
@compatversion@# redefine module command if compat version has been activated
@compatversion@if ENV['MODULES_USE_COMPAT_VERSION'] == '1' then
@compatversion@   ENV['MODULES_CMD'] = '@libexecdir@/modulecmd-compat'
@compatversion@   class ENVModule
@compatversion@      def ENVModule.module(*args)
@compatversion@         if args[0].kind_of?(Array) then
@compatversion@            args = args[0].join(' ')
@compatversion@         else
@compatversion@            args = args.join(' ')
@compatversion@         end
@compatversion@         eval `@libexecdir@/modulecmd-compat ruby #{args}`
@compatversion@         # return value as done on new main version
@compatversion@         return true
@compatversion@      end
@compatversion@   end
@compatversion@end
