Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/alt/ruby18/lib64/ruby/1.8
File: importenv.rb
# importenv.rb -- imports environment variables as global variables, Perlish ;(
[0] Fix | Delete
#
[1] Fix | Delete
# Usage:
[2] Fix | Delete
#
[3] Fix | Delete
# require 'importenv'
[4] Fix | Delete
# p $USER
[5] Fix | Delete
# $USER = "matz"
[6] Fix | Delete
# p ENV["USER"]
[7] Fix | Delete
[8] Fix | Delete
warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: importenv is deprecated after Ruby 1.8.1 (no replacement)"
[9] Fix | Delete
[10] Fix | Delete
for k,v in ENV
[11] Fix | Delete
next unless /^[a-zA-Z][_a-zA-Z0-9]*/ =~ k
[12] Fix | Delete
eval <<EOS
[13] Fix | Delete
$#{k} = v
[14] Fix | Delete
trace_var "$#{k}", proc{|v|
[15] Fix | Delete
ENV[%q!#{k}!] = v
[16] Fix | Delete
$#{k} = v
[17] Fix | Delete
if v == nil
[18] Fix | Delete
untrace_var "$#{k}"
[19] Fix | Delete
end
[20] Fix | Delete
}
[21] Fix | Delete
EOS
[22] Fix | Delete
end
[23] Fix | Delete
[24] Fix | Delete
if __FILE__ == $0
[25] Fix | Delete
p $TERM
[26] Fix | Delete
$TERM = nil
[27] Fix | Delete
p $TERM
[28] Fix | Delete
p ENV["TERM"]
[29] Fix | Delete
$TERM = "foo"
[30] Fix | Delete
p ENV["TERM"]
[31] Fix | Delete
end
[32] Fix | Delete
[33] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function