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

Facilitate reusability (function libraries) #593

Open
blackwinter opened this issue May 20, 2020 · 3 comments
Open

Facilitate reusability (function libraries) #593

blackwinter opened this issue May 20, 2020 · 3 comments
Labels

Comments

@blackwinter
Copy link
Member

blackwinter commented May 20, 2020

use(path_to_fix)
use(path_to_fix, as: namespace)
use(path_to_java)
@TobiasNx
Copy link
Contributor

@blackwinter isn't this already solved with include, macro and your java support?

@blackwinter
Copy link
Member Author

isn't this already solved with include, macro

Catmandu's use() statement works differently:

# this will look for fixes in the Foo::Bar namespace and make them
# available prefixed by fb
use(foo.bar, as: fb)
fb.baz()

# this will look for Foo::Bar::Condition::is_baz
if fb.is_baz()
   ...
   fix()
   ...
end

and your java support?

use(path_to_java) would probably be the correct way to make Java functions available. We're basically making everything on the class path available, just like in Metamorph.

@TobiasNx
Copy link
Contributor

cmd(“java Myclass”)
>> send the record as JSON to the
STDIN of the external command and
replace it with the JSON from the
STDOUT

perlcode(“mycommand.pl”)
>> run the my command.pl on the data
in the record

is stated in the cheat sheet

@blackwinter blackwinter transferred this issue from metafacture/metafacture-fix Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

2 participants