Skip to content
Browse files

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...
1 parent c5fd6a4 commit b26ef270f151c78c489aade4444ccb5fa5f8d4cc @masak masak committed Apr 9, 2010
Showing with 11 additions and 15 deletions.
  1. +7 −5 Makefile
  2. +2 −2 lib/Dispatcher/Rule.pm
  3. +1 −7 lib/November/URI/Grammar.pm
  4. +1 −1 lib/Text/Markup/Wiki/MediaWiki.pm
View
12 Makefile
@@ -1,11 +1,13 @@
PERL6=perl6
-SOURCES=lib/November/CGI.pm lib/Text/Markup/Wiki/Minimal.pm \
+SOURCES=lib/November/URI/Grammar.pm lib/November/URI.pm \
+ lib/November/CGI.pm lib/Text/Markup/Wiki/Minimal.pm \
lib/Text/Markup/Wiki/MediaWiki.pm lib/Digest.pm \
- lib/November/Storage.pm lib/November/Storage/File.pm lib/November/Tags.pm \
- lib/November/URI.pm lib/November/URI/Grammar.pm lib/Dispatcher.pm \
- lib/Dispatcher/Rule.pm lib/November/Session.pm lib/November/Utils.pm \
- lib/November/Config.pm lib/Test/InputOutput.pm lib/Test/CGI.pm \
+ lib/November/Storage.pm lib/November/Utils.pm \
+ lib/November/Config.pm lib/November/Storage/File.pm lib/November/Tags.pm \
+ lib/Dispatcher/Rule.pm lib/Dispatcher.pm \
+ lib/November/Session.pm lib/November/Utils.pm \
+ lib/Test/InputOutput.pm lib/Test/CGI.pm \
lib/November/Cache.pm lib/November.pm
PIRS=$(SOURCES:.pm=.pir)
View
4 lib/Dispatcher/Rule.pm
@@ -9,14 +9,14 @@ has Code $.code;
method match (@chunks) {
return False if @chunks != @!pattern;
- for @chunks Z @!pattern -> $chunk, Object $rule is copy {
+ for @chunks Z @!pattern -> $chunk, $rule is copy {
my $param;
if $rule ~~ Pair { ($param, $rule) = $rule.kv }
if ~$chunk ~~ $rule {
if $param {
- self."$param" = (~$/ || ~$chunk);
+ self."$param"() = (~$/ || ~$chunk);
} else {
# RAKUDO: /./ ~~ Regex us false, but /./ ~~ Code is true
@!args.push($/ || $chunk) if $rule ~~ Code | Whatever; # should by Regex | Whatever
View
8 lib/November/URI/Grammar.pm
@@ -5,13 +5,7 @@ grammar November::URI::Grammar {
token authority { <host> [':' <port>]? };
token host { <-[/&?#:]>* };
token port { (\d**1..5)
- <?{{ $I0 = match[0]
- $I1 = 0
- if $I0 > 65535 goto fail
- $I1 = 1
- fail:
- .return ($I1)
- }}>
+ <?{ $0 < 2 ** 16 }>
<!before \d> };
token path { <slash>? [ <chunk> '/'?]* }; # * mb wrong, because that allow '' URI
token slash { '/' };
View
2 lib/Text/Markup/Wiki/MediaWiki.pm
@@ -42,7 +42,7 @@ class Text::Markup::Wiki::MediaWiki {
}
my &strip_prefix = {
- .subst(/'<' ('/'?) <[uo]> 'li>'/, { "<$0li>" }, :g)
+ .subst(/'<' ('/'?) <[uo]> 'li>'/, { '<' ~ $0 ~ 'li>' }, :g)
};
my &surround_with_list = {

0 comments on commit b26ef27

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