Created
October 16, 2016 16:34
-
-
Save ugexe/77ef72a232773ef2ededf5ce74f89e7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub EXPORT(+@a) { | |
# cw: Implement SELECTIVE loading if necessary. | |
@color_list = @a.elems > 0 ?? | |
@color_lists_found.grep(@a.any) | |
!! | |
@color_lists_found; | |
#if $color_support { | |
# require Color; | |
#} | |
#for @color_list -> $cl { | |
# say "L: $cl"; | |
# require ::("Color::Names::{$cl}"); | |
#} | |
# cw: What we always export. | |
# | |
# Is there any way to get EXPORT::DEFAULT from the module block? | |
{ | |
'&lists_available' => ::('&Color::Names::lists_available'), | |
'&lists_loaded' => ::('&Color::Names::lists_loaded'), | |
'&location' => ::('&Color::Names::location'), | |
'&color' => ::('&Color::Names::color'), | |
'&hex' => ::('&Color::Names::hex'), | |
'&rgb' => ::('&Color::Names::rgb'), | |
@color_list = @a.elems > 0 ?? | |
@color_lists_found.grep(@a.any) | |
!! | |
@color_lists_found; | |
#if $color_support { | |
# require Color; | |
#} | |
#for @color_list -> $cl { | |
# say "L: $cl"; | |
# require ::("Color::Names::{$cl}"); | |
#} | |
# Is there any way to get EXPORT::DEFAULT from the module block? | |
{ | |
'&lists_available' => ::('&Color::Names::lists_available'), | |
'&lists_loaded' => ::('&Color::Names::lists_loaded'), | |
'&location' => ::('&Color::Names::location'), | |
'&color' => ::('&Color::Names::color'), | |
'&hex' => ::('&Color::Names::hex'), | |
'&rgb' => ::('&Color::Names::rgb'), | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment