This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[sweeks@sweeks-laptop parrot]$ ./parrot /tmp/subthrow.pir | |
throwing parrot;Exception | |
in EH, caught a: Exception | |
message is: :( | |
Resuming... | |
back from EH | |
throwing LolException | |
in EH, caught a: LolException | |
message is: OHAI | |
Resuming... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sub main :main | |
.local pmc cl, kl, meth, kli, i | |
cl = get_class 'Class' | |
kl = subclass cl, 'Klass' | |
kli = new kl | |
i = new kli | |
.end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm | |
index 1acdee4..9e44a7b 100644 | |
--- a/src/Perl6/Actions.pm | |
+++ b/src/Perl6/Actions.pm | |
@@ -917,7 +917,9 @@ method package_def($/, $key?) { | |
if $<def_module_name> { | |
my $name := ~$<def_module_name>[0]<longname><name>; | |
if $name ne '::' { | |
- $/.CURSOR.add_name($name, 1); | |
+ if $*SCOPE ne 'anon' { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo { | |
CATCH { | |
say 'b'; | |
} | |
sub fooify { | |
die "wtf"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.10.0; | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
my $default = 50; | |
sub lol { | |
say STDERR "default: $default"; | |
my ($intensity) = ("foo 123" =~ m{^foo (\d+)?$}); | |
return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You're tasked with enforcing the rule "If you are less than 21 years old, you are restricted to ordering non-alcoholic drinks." | |
You have a set of receipts which list an age and a drink order, with one or the other obscured. | |
Given the information you can see on the following receipts, which fields do you need to reveal to detect violations of the rule? | |
1 2 3 4 | |
-------------------------------------------- | |
age: | 19 | 23 | XX | XX | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ### ## | |
### ### | |
### #*# | |
# ##* *# | |
# ##* *# | |
### #*# | |
### ### | |
# ### ## | |
This is looking forward; the blank spaces are the mine shafts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.010; | |
use strict; | |
use warnings; | |
use List::MoreUtils qw/natatime zip/; | |
my $rlp = [ 1, 2, [3, 4, [5, 6]]]; | |
my $rlp1 = [ 1, 2, [3, 4, [5, 6]]]; | |
my $rlp2 = [ 1, 2, [3, 4, [5, 9]]]; | |
sub rcmp { | |
my ($l, $r, $test) = @_; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module A::B; | |
sub C is export { say "called C" }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @clusters = <a b c d e f>; | |
my @backed_up = <a b d f>; | |
my @not = @clusters.grep(* eq none(@backed_up)); | |
say @not.perl; # ["c", "e"] |