Skip to content

Commit

Permalink
Make the Format class a Callable
Browse files Browse the repository at this point in the history
So that this can work:

    use v6.e.PREVIEW;
    my constant &logger = Format.new("%04d - %s\n");
    for lines {
        m/.../;
        print logger $0, $1;
    }
  • Loading branch information
lizmat committed Dec 10, 2023
1 parent e22987f commit bd43800
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.e/Format.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# contains a Callable that will be called with the CALL-ME method.
# Otherwise acts as a normal string.

my class Format is Str {
my class Format is Str is Callable {
has str @!directives;
has &!code;

Expand Down

0 comments on commit bd43800

Please sign in to comment.