=begin pod :kind("Type") :subkind("class") :category("exception")

=TITLE class X::Syntax::Variable::Twigil

=SUBTITLE Compilation error due to an unallowed twigil in a declaration

    class X::Syntax::Variable::Twigil does X::Syntax { }

Syntax error thrown when a variable with a twigil is used in an incompatible
declaration.

For example

=for code :skip-test<compile time error>
my $!foo;

dies with

=for code :lang<text>
===SORRY!===
Cannot use ! twigil on my variable

=head1 Methods

=head2 method twigil

    method twigil(--> Str:D)

Returns the twigil that was illegally used

=head2 method scope

    method scope(--> Str:D)

Returns the scope that did not harmonize with the twigil.

=end pod
