In the previous articles, we’ve seen that the undefined value cannot be easily interpolated in a string, as an exception occurs. Today, our goal is to see where exactly that happens in the source code of Rakudo. So, as soon as we’ve looked at the Boolean values, let’s continue with them. Open perl6 in the … Continue reading “🔬5. Lurking behind interpolation in Perl 6”
Tag: interpolation
🔬3. Playing with the code of Rakudo Perl 6
Yesterday, we looked at the two methods of the Bool class that return strings. The string representation that the functions produce is hardcoded in the source code. Let’s use this observation and try changing the texts. So, here is the fragment that we will modify: Bool.^add_multi_method(‘gist’, my multi method gist(Bool:D:) { self ?? ‘True’ !! … Continue reading “🔬3. Playing with the code of Rakudo Perl 6”