2003-10-04 22:56:42 -04:00
|
|
|
BEGIN {
|
2003-10-05 00:51:05 -04:00
|
|
|
puts "begin1"
|
|
|
|
local_begin1 = "local_begin1"
|
|
|
|
$global_begin1 = "global_begin1"
|
|
|
|
ConstBegin1 = "ConstBegin1"
|
2003-10-04 22:56:42 -04:00
|
|
|
}
|
|
|
|
|
2003-10-05 00:51:05 -04:00
|
|
|
BEGIN {
|
|
|
|
puts "begin2"
|
|
|
|
}
|
|
|
|
|
|
|
|
# for scope check
|
|
|
|
raise if defined?(local_begin1)
|
|
|
|
raise unless defined?($global_begin1)
|
|
|
|
raise unless defined?(::ConstBegin1)
|
|
|
|
local_for_end2 = "end2"
|
|
|
|
$global_for_end1 = "end1"
|
|
|
|
|
2003-10-04 22:56:42 -04:00
|
|
|
puts "main"
|
|
|
|
|
|
|
|
END {
|
2003-10-05 00:51:05 -04:00
|
|
|
puts local_for_end2
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
raise
|
|
|
|
puts "should not be dumped"
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
exit
|
|
|
|
puts "should not be dumped"
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
puts $global_for_end1
|
2003-10-04 22:56:42 -04:00
|
|
|
}
|