summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/WebCoso/File.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/WebCoso/File.pm b/lib/WebCoso/File.pm
index 764cf2f..1a75e98 100644
--- a/lib/WebCoso/File.pm
+++ b/lib/WebCoso/File.pm
@@ -8,7 +8,9 @@ class WebCoso::File {
$self.bless(:$path);
}
- submethod BUILD(Str(Cool) :$!lang, Str(Cool) :$!path) {}
+ submethod BUILD(:$lang, Str(Cool) :$!path) {
+ $!lang = $lang.Str if $lang.defined;
+ }
multi method contents() {
return $!contents //= $.parse();