Skip to content

Instantly share code, notes, and snippets.

@moritz
Created September 6, 2016 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/ab4cf411bd9b42f8450a8a8439466e37 to your computer and use it in GitHub Desktop.
Save moritz/ab4cf411bd9b42f8450a8a8439466e37 to your computer and use it in GitHub Desktop.
Make precompile backwards compatible again.
diff --git a/src/core/CompUnit/PrecompilationRepository.pm b/src/core/CompUnit/PrecompilationRepository.pm
index 159e354..975fcfc 100644
--- a/src/core/CompUnit/PrecompilationRepository.pm
+++ b/src/core/CompUnit/PrecompilationRepository.pm
@@ -171,7 +171,18 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
Nil
}
- method precompile(
+ proto method precompile(|) {*}
+
+ multi method precompile(
+ IO::Path:D $path,
+ Str $id,
+ Bool :$force = False,
+ :$source-name = $path.Str
+ ) {
+ self.precompile($path, CompUnit::PrecompilationId.new($id), :$force, :$source-name)
+ }
+
+ multi method precompile(
IO::Path:D $path,
CompUnit::PrecompilationId $id,
Bool :$force = False,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment