Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make keyword? #160

Closed
djzort opened this issue Nov 13, 2021 · 4 comments
Closed

make keyword? #160

djzort opened this issue Nov 13, 2021 · 4 comments
Labels
question Support question, please use other forums instead

Comments

@djzort
Copy link

djzort commented Nov 13, 2021

In this guide https://github.com/RexOps/rexify-website/blob/master/content/docs/rex_book/infrastructure/example_of_a_complete_rex_code_infrastructure.md

there is a keyword "make" that doesnt seem to appear anywhere else

could its function be clarified?

@krimdomu
Copy link
Contributor

krimdomu commented Jan 13, 2022

The make keyword was added because of a joke. A colleague of mine loved the make tool so he wrote everything in makefiles ;-)

It is just a replacement for sub. So it just returns the given anonymous function.

This is the code inside Rex::Commands:

sub make(&) {
  return $_[0];
}

@ferki ferki added the question Support question, please use other forums instead label Jan 21, 2022
@ferki
Copy link
Member

ferki commented Jan 21, 2022

Thanks for this question as well, @djzort! And for the insights about the origin story of make, @krimdomu! :)

@ferki ferki closed this as completed Jan 21, 2022
@djzort
Copy link
Author

djzort commented Jan 22, 2022

It might be a good idea to remove it from the documentation.

@ferki
Copy link
Member

ferki commented Jan 22, 2022

It might be a good idea to remove it from the documentation.

The Rex documentation lives in the RexOps/Rex repo together with the code (and released to CPAN). In order to not break backwards compatibility, we can't remove make quickly from the API, but we could add some documentation for it there, and perhaps also add a deprecation notice later if we deem it should go away in a later major release.

As far as the guides and the "Rex book" on the website are concerned, it might help to think of those as more of "a collection of articles written by various people across years", instead of "documentation". Most of those authors don't maintain the content actively here anymore, so I considered moving them into an "archive" section to make that explicit, and also display the original author and last modification date of each page (see #155).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support question, please use other forums instead
Projects
None yet
Development

No branches or pull requests

3 participants