Skip to content

Instantly share code, notes, and snippets.

@Siddhant
Created June 26, 2012 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Siddhant/2994193 to your computer and use it in GitHub Desktop.
Save Siddhant/2994193 to your computer and use it in GitHub Desktop.
$ cat error.pl
class foo {
has $.x;
}
my $obj = foo.new;
$obj.x = 42;
$ perl6 error.pl
Cannot assign to a readonly variable or a value
in block <anon> at error.pl:1
$ perl6 --version
This is perl6 version 2012.06-14-gdba6e9c built on parrot 4.5.0 revision RELEASE_4_5_0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment