stevied ok, got another little question. I want to do something like this: `method new(%args) ` 00:29
where the signature is "autovivified" for lack of a better word, when I pass arguments to it 00:31
so I'd have something like this: 00:32
```
method new(%args) {
%args<input_file>.IO.e ?? self.IO::Path::new(%args<input_file>)!SET-SELF()
!! die "%args<input_file> is not a file";
}
```
not sure if this is possible with new new constructor 00:33
nice, worked with no problem 00:35
what's everyone using for something similar to Lof4Perl? 01:23
guifa_ stevied: how are you passing the arguments? 03:12
%args will be defined, but empty 03:13
(assuming no arguments passed)
If you pass anything that's Associative, then %args will become that thing
If you're wanting to be able to say .new(a => 4, b => 6), then you'd probably want a slurpy (that is, method new (*%args) { … } ) 03:14
If you want to be able to handle .new('a', 4, 'b', 6), then you're best bet is to make it a multi method, with one capturing a positional slurpy, and redispatching to your single argument %args 03:15
e.g. multi method new (*@args) { samewith Hash.new: |@args } 03:16