Skip to content

Instantly share code, notes, and snippets.

@gfldex
Created October 9, 2021 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfldex/ce1cc2fa77e6b1c7f4dc21d4974ee5fc to your computer and use it in GitHub Desktop.
Save gfldex/ce1cc2fa77e6b1c7f4dc21d4974ee5fc to your computer and use it in GitHub Desktop.
use v6.d;
use Transport {'WWW', :prefix<www->};
say www-get('http://www.heise.de/index.html');
use v6.d;
sub EXPORT(&args) {
my ($module-name, *%tags) = args;
my \module = (require ::($module-name));
my %exports = module.WHO<EXPORT>.WHO<DEFAULT>.WHO.&{.keys Z=> .values};
my %prefixed-exports = %exports.map: { .key.substr(0, 1) ~ %tags<prefix> ~ .key.substr(1..*) => .value };
%prefixed-exports.Map
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment