2003-10-04 22:56:42 -04:00
|
|
|
BEGIN {
|
2003-10-07 02:27:11 -04:00
|
|
|
puts "b1"
|
2015-03-09 02:51:20 -04:00
|
|
|
# local_begin1 = "local_begin1"
|
2003-10-05 00:51:05 -04:00
|
|
|
$global_begin1 = "global_begin1"
|
|
|
|
ConstBegin1 = "ConstBegin1"
|
2003-10-04 22:56:42 -04:00
|
|
|
}
|
|
|
|
|
2003-10-05 00:51:05 -04:00
|
|
|
BEGIN {
|
2003-10-07 02:27:11 -04:00
|
|
|
puts "b2"
|
|
|
|
|
|
|
|
BEGIN {
|
|
|
|
puts "b2-1"
|
|
|
|
}
|
2003-10-05 00:51:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
# for scope check
|
2006-12-31 10:02:22 -05:00
|
|
|
#raise if defined?(local_begin1)
|
2003-10-05 00:51:05 -04:00
|
|
|
raise unless defined?($global_begin1)
|
|
|
|
raise unless defined?(::ConstBegin1)
|
2003-10-07 02:27:11 -04:00
|
|
|
local_for_end2 = "e2"
|
|
|
|
$global_for_end1 = "e1"
|
2003-10-05 00:51:05 -04:00
|
|
|
|
2003-10-04 22:56:42 -04:00
|
|
|
puts "main"
|
|
|
|
|
|
|
|
END {
|
2003-10-07 02:27:11 -04:00
|
|
|
puts local_for_end2 # e2
|
2003-10-05 00:51:05 -04:00
|
|
|
}
|
|
|
|
|
2003-10-05 22:58:39 -04:00
|
|
|
eval <<EOE
|
|
|
|
BEGIN {
|
2003-10-07 02:27:11 -04:00
|
|
|
puts "b3"
|
|
|
|
|
|
|
|
BEGIN {
|
|
|
|
puts "b3-1"
|
|
|
|
}
|
2003-10-05 22:58:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
BEGIN {
|
2003-10-07 02:27:11 -04:00
|
|
|
puts "b4"
|
2003-10-05 22:58:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
2003-10-07 02:27:11 -04:00
|
|
|
puts "e3"
|
2003-10-05 22:58:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
2003-10-07 02:27:11 -04:00
|
|
|
puts "e4"
|
|
|
|
|
|
|
|
END {
|
|
|
|
puts "e4-1"
|
|
|
|
|
|
|
|
END {
|
|
|
|
puts "e4-1-1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
puts "e4-2"
|
|
|
|
}
|
2003-10-05 22:58:39 -04:00
|
|
|
}
|
|
|
|
EOE
|
|
|
|
|
2003-10-05 00:51:05 -04:00
|
|
|
END {
|
|
|
|
exit
|
|
|
|
puts "should not be dumped"
|
2003-10-07 02:27:11 -04:00
|
|
|
|
|
|
|
END {
|
|
|
|
puts "not reached"
|
|
|
|
}
|
2003-10-05 00:51:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
2003-10-07 02:27:11 -04:00
|
|
|
puts $global_for_end1 # e1
|
|
|
|
|
|
|
|
END {
|
|
|
|
puts "e1-1"
|
|
|
|
}
|
2003-10-04 22:56:42 -04:00
|
|
|
}
|