Skip to content

Commit 1fc5dfb

Browse files
committed
Adds exception for Perl 5 variables
Refs #2632
1 parent 682f749 commit 1fc5dfb

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

doc/Type/X/Syntax/Perl5Var.pod6

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
=begin pod :kind("Type") :subkind("class") :category("exception")
2+
3+
=TITLE class X::Syntax::Perl5Var
4+
5+
=SUBTITLE Compilation error due to use of Perl 5-only default variables
6+
7+
class X::Syntax::Perl5Var does X::Syntax { }
8+
9+
Syntax error thrown when some piece of code tries to use one of the old Perl
10+
5 variables (and it does not error for some other reason).
11+
12+
=for code :skip-test<Throws an exception>
13+
say $];
14+
15+
dies with
16+
17+
=for code :lang<text>
18+
Unsupported use of $] variable; in Perl 6 please use $*PERL.version or $*PERL.compiler.version
19+
20+
For every unsupported variable (which include most C<$^'letter'> constructs,
21+
as well as others like C<$">, the error message will mention that the
22+
variable is unsupported and the equivalent commands you could use.
23+
24+
25+
=end pod

0 commit comments

Comments
 (0)