Skip to content
This repository
Browse code

adaptations for building on the new Rakudo master

- reordered modules in the Makefile to build in dependency order. makes
  things faster and less confusing.

- removed 'Object' in for loop signature. this should be 'Mu' nowadays, but
  'Mu' in pointy blocks is the default anyway, so no need to say it explicitly.

- added now-mandatory '()' after interpolated method name.

- replaced PIR closure in token with Perl 6 closure.

- removed a parsing ambiguity "$0li" which alpha didn't catch.
  • Loading branch information...
commit b26ef270f151c78c489aade4444ccb5fa5f8d4cc 1 parent c5fd6a4
Carl Mäsak masak authored
12 Makefile
... ... @@ -1,11 +1,13 @@
1 1 PERL6=perl6
2 2
3   -SOURCES=lib/November/CGI.pm lib/Text/Markup/Wiki/Minimal.pm \
  3 +SOURCES=lib/November/URI/Grammar.pm lib/November/URI.pm \
  4 + lib/November/CGI.pm lib/Text/Markup/Wiki/Minimal.pm \
4 5 lib/Text/Markup/Wiki/MediaWiki.pm lib/Digest.pm \
5   - lib/November/Storage.pm lib/November/Storage/File.pm lib/November/Tags.pm \
6   - lib/November/URI.pm lib/November/URI/Grammar.pm lib/Dispatcher.pm \
7   - lib/Dispatcher/Rule.pm lib/November/Session.pm lib/November/Utils.pm \
8   - lib/November/Config.pm lib/Test/InputOutput.pm lib/Test/CGI.pm \
  6 + lib/November/Storage.pm lib/November/Utils.pm \
  7 + lib/November/Config.pm lib/November/Storage/File.pm lib/November/Tags.pm \
  8 + lib/Dispatcher/Rule.pm lib/Dispatcher.pm \
  9 + lib/November/Session.pm lib/November/Utils.pm \
  10 + lib/Test/InputOutput.pm lib/Test/CGI.pm \
9 11 lib/November/Cache.pm lib/November.pm
10 12
11 13 PIRS=$(SOURCES:.pm=.pir)
4 lib/Dispatcher/Rule.pm
@@ -9,14 +9,14 @@ has Code $.code;
9 9
10 10 method match (@chunks) {
11 11 return False if @chunks != @!pattern;
12   - for @chunks Z @!pattern -> $chunk, Object $rule is copy {
  12 + for @chunks Z @!pattern -> $chunk, $rule is copy {
13 13
14 14 my $param;
15 15 if $rule ~~ Pair { ($param, $rule) = $rule.kv }
16 16
17 17 if ~$chunk ~~ $rule {
18 18 if $param {
19   - self."$param" = (~$/ || ~$chunk);
  19 + self."$param"() = (~$/ || ~$chunk);
20 20 } else {
21 21 # RAKUDO: /./ ~~ Regex us false, but /./ ~~ Code is true
22 22 @!args.push($/ || $chunk) if $rule ~~ Code | Whatever; # should by Regex | Whatever
8 lib/November/URI/Grammar.pm
@@ -5,13 +5,7 @@ grammar November::URI::Grammar {
5 5 token authority { <host> [':' <port>]? };
6 6 token host { <-[/&?#:]>* };
7 7 token port { (\d**1..5)
8   - <?{{ $I0 = match[0]
9   - $I1 = 0
10   - if $I0 > 65535 goto fail
11   - $I1 = 1
12   - fail:
13   - .return ($I1)
14   - }}>
  8 + <?{ $0 < 2 ** 16 }>
15 9 <!before \d> };
16 10 token path { <slash>? [ <chunk> '/'?]* }; # * mb wrong, because that allow '' URI
17 11 token slash { '/' };
2  lib/Text/Markup/Wiki/MediaWiki.pm
@@ -42,7 +42,7 @@ class Text::Markup::Wiki::MediaWiki {
42 42 }
43 43
44 44 my &strip_prefix = {
45   - .subst(/'<' ('/'?) <[uo]> 'li>'/, { "<$0li>" }, :g)
  45 + .subst(/'<' ('/'?) <[uo]> 'li>'/, { '<' ~ $0 ~ 'li>' }, :g)
46 46 };
47 47
48 48 my &surround_with_list = {

0 comments on commit b26ef27

Please sign in to comment.
Something went wrong with that request. Please try again.