diff --git a/src/setting/Hash.pm b/src/setting/Hash.pm index e3d3f58..8df0067 100644 --- a/src/setting/Hash.pm +++ b/src/setting/Hash.pm @@ -75,6 +75,6 @@ module Hash { Construct a hash from named arguments. =end item -sub hash(*%h) { %h } +our sub hash(*%h) { %h } # vim: ft=perl6 diff --git a/src/setting/IO.pm b/src/setting/IO.pm index 17cef18..39f2d95 100644 --- a/src/setting/IO.pm +++ b/src/setting/IO.pm @@ -10,7 +10,7 @@ IO Methods and Functions Returns the contents of C<$filename> as a single string. =end -sub slurp ($filename) { +our sub slurp ($filename) { my $handle := pir::open__Pss($file, 'r'); my $contents := $handle.readall; pir::close($handle); @@ -22,7 +22,7 @@ sub slurp ($filename) { Write the string value of C<$contents> to C<$filename>. =end item -sub spew($filename, $contents) { +our sub spew($filename, $contents) { my $handle := pir::open__Pss($filename, 'w'); $handle.print($contents); pir::close($handle); diff --git a/src/setting/Regex.pm b/src/setting/Regex.pm index ae6036e..2d95ae5 100644 --- a/src/setting/Regex.pm +++ b/src/setting/Regex.pm @@ -11,7 +11,7 @@ Match C<$text> against C<$regex>. If the C<$global> flag is given, then return an array of all non-overlapping matches. =end item -sub match ($text, $regex, :$global?) { +our sub match ($text, $regex, :$global?) { my $match := $text ~~ $regex; if $global { my @matches; @@ -33,7 +33,7 @@ returning the substituted string. If C<$global> is given, then perform the replacement on all matches of C<$text>. =end item -sub subst ($text, $regex, $repl, :$global?) { +our sub subst ($text, $regex, $repl, :$global?) { my @matches := $global ?? match($text, $regex, :global) !! [ $text ~~ $regex ]; my $is_code := pir::isa($repl, 'Sub'); diff --git a/src/setting/ResizablePMCArray.pm b/src/setting/ResizablePMCArray.pm index 64c8d53..47cc273 100644 --- a/src/setting/ResizablePMCArray.pm +++ b/src/setting/ResizablePMCArray.pm @@ -44,8 +44,8 @@ module ResizablePMCArray { } -sub join ($separator, *@values) { @values.join($separator); } -sub map (&code, *@values) { @values.map(&code); } -sub list (*@values) { @values; } +our sub join ($separator, *@values) { @values.join($separator); } +our sub map (&code, *@values) { @values.map(&code); } +our sub list (*@values) { @values; } # vim: ft=perl6