Please sign in to comment.
Add $?DISTRIBUTION (#2574)
Add a variable to give module authors a way to access *any* file in their distribution as well as the distribution meta data. It might seem like `$?FILE` can provide everything required, but some `CompUnit::Repository` may not have an e.g. on-disk representation of the files listed in the meta data -- this allows IO access using the file names as listed in the meta data regardless of the `CompUnit::Repository` that loaded it. Some uses: * `say "Version: " ~ $?DISTRIBUTION.meta<ver>` * `$?DISTRIBUTION.content('lib/Any/Module/In/Distribution.pm6').open.slurp(:close)` * `$?DISTRIBUTION.content('resources/libraries/p5helper').open.slurp(:close)` ( similar to `%?RESOURCES<libraries/p5helper>.IO.open.slurp(:close)` )
- Loading branch information...
Showing with 72 additions and 8 deletions.