conditionally use packages
Perl6
Switch branches/tags
Nothing to show
Latest commit a70e402 Oct 26, 2016 @FROGGS committed on GitHub Merge pull request #1 from zoffixznet/patch-1
Add mandatory "perl" META field
Permalink
Failed to load latest commit information.
lib remove any nqp-isms Feb 1, 2016
t initial but working commit Jan 12, 2016
.travis.yml add travis config file Jan 12, 2016
META6.json Add mandatory "perl" META field Oct 26, 2016
README.md add travis badge Jan 12, 2016

README.md

if - conditionally use packages Build Status

if, similar to Perl 5's pragma if will let you conditionally load packages. Use cases (no pun intended) are about loading different implementations of a functionality for different operating systems, compiler backends, or compiler versions.

This means that these switches for different implementations do not happen at runtime, but cheaply at compile time. This also means that a custom build and install hook is not needed because all implementations are installed. Then depending on the conditions only the desired implementation will be used.

Even if the switch is by backends you can share one installation by several backends using this technique.

use if; # activate the :if adverb on use statements

use My::Linux::Backend:if($*KERNEL.name eq 'linux');
use My::Fallback::Backend:if($*KERNEL.name ne 'linux');

# ... do something with the backend you got

INSTALLATION

panda install if