Skip to content

Commit 8a139ad

Browse files
author
H.Merijn Brand - Tux
committed
@x and %x do not need is rw in signatures
1 parent 4684305 commit 8a139ad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

NLPW-2015/090-hooks.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ is ($s, "bar", "value");
2929
perl6
3030

3131
sub Empty (Text::CSV $c, CSV::Field @f) {}
32-
sub Drop (Text::CSV $c, CSV::Field @f is rw) { @f.pop; }
33-
sub Push (Text::CSV $c, CSV::Field @f is rw) { @f.push (CSV::Field.new); }
34-
sub Replc (Text::CSV $c, CSV::Field @f is rw) { @f[1] = CSV::Field.new; }
35-
sub Unshf (Text::CSV $c, CSV::Field @f is rw) { @f.unshift (CSV::Field.new ("0")); }
32+
sub Drop (Text::CSV $c, CSV::Field @f) { @f.pop; }
33+
sub Push (Text::CSV $c, CSV::Field @f) { @f.push (CSV::Field.new); }
34+
sub Replc (Text::CSV $c, CSV::Field @f) { @f[1] = CSV::Field.new; }
35+
sub Unshf (Text::CSV $c, CSV::Field @f) { @f.unshift (CSV::Field.new ("0")); }
3636

3737
ok ($csv.meta (True), "Set meta again");
3838
is_deeply ([$csv.getline ("1,2").map (~*)], ["1","2"], "Parse no cb");

t/91_csv_cb.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ is-deeply (csv (in => $file, after_in => &Push), [
5151
[ 2, "a b", "", "A" ],
5252
], "AOA ith after_in callback");
5353

54-
sub Change (Text::CSV $c, CSV::Field %f is rw) { %f<baz> = "A"; }
54+
sub Change (Text::CSV $c, CSV::Field %f) { %f<baz> = "A"; }
5555

5656
is-deeply (csv (in => $file, headers => "auto", after_in => &Change), [
5757
{ foo => 1, bar => 2, baz => "A" },

0 commit comments

Comments
 (0)