Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use more information from pmichaud

  • Loading branch information...
commit 48fda6b0b419f727efa1fe4e326953ed4ccc88aa 1 parent 40aca7f
@ruoso authored
Showing with 6 additions and 17 deletions.
  1. +6 −17 lib/Faz/Dispatcher.pm
View
23 lib/Faz/Dispatcher.pm
@@ -35,26 +35,14 @@ role Faz::Dispatcher {
my @subregexes = map { buildspec($_) }, @!public;
my &subrx = -> $/ {
- say 'subrx 1';
- my $match = $/.new($/);
- for @subregexes -> &rx {
- say 'subrx 2';
- my $submatch = $/.new($/);
- say $/.perl;
- say 'subrx 3';
- my $result = rx($submatch);
- say 'subrx 4';
+ for @subregexes -> &subrx {
+ my $result = subrx($/);
if $result {
- say 'subrx 4.1';
- $match = $result;
- say 'subrx 4.2';
+ return $result;
};
- say 'subrx 5';
};
- say 'subrx 6';
- make $match;
- say 'subrx 7';
- }
+ return Match.new($/);
+ };
$!regex = token { $<action> = <subrx> };
@@ -71,6 +59,7 @@ say 'before';
say 'after';
self.run-action($<action><?>, |$<action><actcap>);
} else {
+say 'failed!';
fail 'No action matched';
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.