Skip to content

Instantly share code, notes, and snippets.

@niner
Created February 7, 2020 15:14
Show Gist options
  • Save niner/f83e07bd4f5818bbd8738fa922d0da57 to your computer and use it in GitHub Desktop.
Save niner/f83e07bd4f5818bbd8738fa922d0da57 to your computer and use it in GitHub Desktop.
nine@sphinx:~/test/resources> cat META6.json
{
"name": "Foo",
"provides": {"Foo": "Foo.pm6"},
"resources": ["foo.txt"]
}
nine@sphinx:~/test/resources> cat Foo.pm6
unit module Foo;
sub get-resources() is export { %?RESOURCES }
nine@sphinx:~/test/resources> perl6 -I. -e 'use Foo; dd get-resources'
Distribution::Resources.new(dist-id => ":ver<>:auth<>:api<>", repo => "file#/home/nine/test/resources", repo-name => Str)
nine@sphinx:~/test/resources> perl6 -I. -e 'use Foo; get-resources<foo.txt>.slurp.say'
foo!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment