tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
4
Task/Scope-modifiers/Perl-6/scope-modifiers-1.pl6
Normal file
4
Task/Scope-modifiers/Perl-6/scope-modifiers-1.pl6
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
my $lexical-variable;
|
||||
our $package-variable;
|
||||
state $persistent-lexical;
|
||||
has $.public-attribute;
|
||||
13
Task/Scope-modifiers/Perl-6/scope-modifiers-2.pl6
Normal file
13
Task/Scope-modifiers/Perl-6/scope-modifiers-2.pl6
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
sub a {
|
||||
my $*dyn = 'a';
|
||||
c();
|
||||
}
|
||||
sub b {
|
||||
my $*dyn = 'b';
|
||||
c();
|
||||
}
|
||||
sub c {
|
||||
say $*dyn;
|
||||
}
|
||||
a(); # says a
|
||||
b(); # says b
|
||||
Loading…
Add table
Add a link
Reference in a new issue