From cbb1ccd89b78c13dd95cd878b016afda8ed5b9aa Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Mon, 4 Jun 2018 13:55:05 +0200 Subject: [PATCH] Add concept of stubbing a class should you need to --- doc/Language/5to6-nutshell.pod6 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/Language/5to6-nutshell.pod6 b/doc/Language/5to6-nutshell.pod6 index 26e84c881..8336aa311 100644 --- a/doc/Language/5to6-nutshell.pod6 +++ b/doc/Language/5to6-nutshell.pod6 @@ -1155,9 +1155,22 @@ C keyword, in the class declaration. package Cat; use base qw(Animal); -=for code :preamble +=for code :preamble # PerlĀ 6 -class Cat is Animal {}; +class Cat is Animal {} + +Note that the C class must be B at compilation time. If for +some you need to specify / load your modules in a particular order, you can +create a stub that will be acceptable until the end of compilation: if the +stub has not been defined then, compilation will fail. + +=for code :preamble +# PerlĀ 6 +class Animal { ... } # the ... indicates a stub +class Cat is Animal {} +class Animal { + # the real thing +} =head3 C C C