Skip to content

Allow passing of both positional and named parameters to producer - #7

Open
vrurg wants to merge 1 commit into
robertlemmen:masterfrom
vrurg:get-any-args
Open

Allow passing of both positional and named parameters to producer#7
vrurg wants to merge 1 commit into
robertlemmen:masterfrom
vrurg:get-any-args

Conversation

@vrurg

@vrurg vrurg commented Jul 31, 2019

Copy link
Copy Markdown
Contributor

In certain circumstances it would be useful to provide the producer with
additional named parameters. For example, I use it to vivify missing
database records. For now the only way for signal that vivification is
allowed is dynamic variables. Whereas it could be done like:

$cache.get(|@pos, :vivify);

The patch is passing all tests. But if this call format is desirable:

$cache.get(@pos)

then get signature should be changed to more explicit slurping. Though to my view bypassing parameters as-is is the most transparent option.

In certain circumstances it would be useful to provide the producer with
additional named parameters. For example, I use it to vivify missing
database records. For now the only way for signal that vivification is
allowed is dynamic variables. Whereas it could be done like:

$cache.get(|@pos, :vivify);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant