Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add unit declarator to module, class and grammar declarations
As of Rakudo 2015.05, the `unit` declarator is required before using
`module`, `class` or `grammar` declarations (unless it uses a block).  Code
still using the old blockless semicolon form will throw a warning. This
commit stops the warning from appearing in the new Rakudo.
  • Loading branch information
Paul Cochrane committed May 18, 2015
1 parent 354b936 commit 532723d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/JSON/Tiny.pm
Expand Up @@ -13,7 +13,7 @@ It supports strings, numbers, arrays and hashes (no custom objects).
=end pod

module JSON::Tiny;
unit module JSON::Tiny;

use JSON::Tiny::Actions;
use JSON::Tiny::Grammar;
Expand Down
2 changes: 1 addition & 1 deletion lib/JSON/Tiny/Actions.pm
@@ -1,4 +1,4 @@
class JSON::Tiny::Actions;
unit class JSON::Tiny::Actions;

method TOP($/) {
make $/.values.[0].made;
Expand Down
2 changes: 1 addition & 1 deletion lib/JSON/Tiny/Grammar.pm
@@ -1,5 +1,5 @@
use v6;
grammar JSON::Tiny::Grammar;
unit grammar JSON::Tiny::Grammar;

token TOP { ^ \s* [ <object> | <array> ] \s* $ }
rule object { '{' ~ '}' <pairlist> }
Expand Down

0 comments on commit 532723d

Please sign in to comment.