Author: coke
Date: Thu Jun 7 13:33:24 2007
New Revision: 18865
Modified:
trunk/ (props changed)
trunk/languages/perl6/t/01-sanity/07-end-blocks.t
Log:
[perl6] update our checked in sanity tests to reflect pugs-latest.
Modified: trunk/languages/perl6/t/01-sanity/07-end-blocks.t
==============================================================================
--- trunk/languages/perl6/t/01-sanity/07-end-blocks.t (original)
+++ trunk/languages/perl6/t/01-sanity/07-end-blocks.t Thu Jun 7 13:33:24 2007
@@ -1,12 +1,21 @@
use v6-alpha;
-
say "1..2";
-our $was_in_second_end_block = 0;
+#
+# $was_in_second_end_block is a package variable, not a lexical one, per S04:
+#
+# Some closures produce C<Code> objects at compile time that cannot be
+# cloned, because they're not attached to any runtime code that can
+# actually clone them. C<BEGIN>, C<CHECK>, C<INIT>, and C<END> blocks
+# fall into this category... It's only safe to refer to package
+# variables and file-scoped lexicals from such a routine.
+#
+
+$Main::was_in_second_end_block = 0;
END {
- if $was_in_second_end_block {
+ if $Main::was_in_second_end_block {
say "ok 2";
} else {
say "not ok 2";
@@ -14,6 +23,6 @@
}
END {
- $was_in_second_end_block = 1;
+ $Main::was_in_second_end_block = 1;
say "ok 1";
}