Skip to content

Commit 3c33cd4

Browse files
authored
make examples for is dynamic look parallel
In particular, put both inside a block.
1 parent 0812f14 commit 3c33cd4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/Type/Variable.rakudoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ without being in an inner lexical scope.
6060
sub introspect() {
6161
say $CALLER::x;
6262
}
63-
my $x is dynamic = 23;
64-
introspect; # OUTPUT: «23␤»
6563
{
66-
# not dynamic
67-
my $x;
68-
introspect() # dies with an exception of X::Caller::NotDynamic
64+
my $x is dynamic = 42;
65+
introspect(); # OUTPUT: «42␤»
66+
}
67+
{
68+
my $x = 41; # not dynamic
69+
introspect(); # dies with an exception of X::Caller::NotDynamic
6970
}
7071
=end code
7172

0 commit comments

Comments
 (0)