Welcome the channel on the development of Cro, a set of libraries for building reactive distributed systems, lovingly crafted to take advantage of all the Raku Programming Language has to offer (cro.services). This channel is being logged for historical purposes. Set by lizmat on 24 May 2021. |
|||
lizmat | SmokeMachine_ not that I know of specifically | 10:04 | |
what kind of signature should I use for a URL of the form "foo.html?stuff_without_name | 10:05 | ||
" ? | |||
SmokeMachine_ | thanks, I've used Test::Mock like this: github.com/FCO/SimpleDebit/blob/ma...kutest#L39 | 10:06 | |
lizmat | I think that is what is being used for these cases, yes | ||
SmokeMachine_ | lizmat: ^^ | ||
lizmat | guess I should just use foo.html/stuff_without_name as the url :-) | 10:10 | |
but meh | 10:11 | ||
SmokeMachine_ | maybe `stuff_without_name => True`? I'm just gessing | ||
sorry, you want a route I was thinking on request, sorry | 10:20 | ||
lizmat | I sorta expected a URL foo.html?stuff with a route of 'foo.html', :%args | 10:22 | |
to have %args<query> to contain "stuff" | |||
instead %args contains { stuff => "" } | |||
guess I'll use %args.keys.first for now | 10:24 | ||
SmokeMachine_ | maybe *%args? | 10:25 | |
lizmat | ?? | 10:26 | |
SmokeMachine_ | I meant something like this: | 10:33 | |
m: sub a(*%args) { dd %args }; a :stuff | |||
but I couldn't make it work on my tests with cro | |||
`get -> *%stuff { ... }` warns errors... `Use of uninitialized value element of type Any in string context` | 10:35 | ||
the :%args you said worked here to me! | 10:37 | ||
lizmat | yeah, that works ok... it's just that for a URL like foo.html?stuff | ||
I sorta expected it to wind up as { query => 'stuff' } | 10:38 | ||
rather than { stuff => "" } | |||
SmokeMachine_ | usercontent.irccloud-cdn.com/file/.../image.png | 10:39 | |
ok, now I think I got it... sorry for my confusion | |||
lizmat | yup, that's it | 10:43 | |
expected to see {:query("stuff")} | 10:44 |