Skip to content
Permalink
Browse files

Reduce overhead of CURI::!repository-version

  • Loading branch information...
niner committed May 19, 2018
1 parent 7674b66 commit 077f88a5f7045a88b289da8979367dc0adb93148
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/CompUnit/Repository/Installation.pm6
@@ -105,10 +105,10 @@ sub MAIN(:$name, :$auth, :$ver, *@, *%) {
}

method !repository-version(--> Int:D) {
return $!version if defined $!version;
my $version-file = $.prefix.add('version');
return $!version = 0 unless $version-file ~~ :f;
$!version = $version-file.slurp.Int
$!version //= do {
my $version-file = $.prefix.add('version');
$version-file.f ?? $version-file.slurp.Int !! 0
}
}

method upgrade-repository() {

0 comments on commit 077f88a

Please sign in to comment.
You can’t perform that action at this time.