Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2021
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. #Tests.rakumod
  2. use v6.*;
  3.  
  4. module Test {
  5. use Colors;
  6. BEGIN {
  7. for
  8. Colors:: #Is a custum module containing constants
  9. -> $stash {
  10. .raku.say;
  11. for $stash.grep(*.key.match(/.*/)) {
  12. say .key.raku ~ ' => ' ~ .value.raku;
  13. }
  14. }
  15. }
  16. }
  17.  
  18. sub EXPORT(*@args, *%_) {
  19. if @args {
  20. my $imports := Map.new( |(EXPORT::all::{ @args.map: '&' ~ * }:p) );
  21. if $imports != @args {
  22. die "List::AllUtils doesn't know how to export: "
  23. ~ @args.grep( { !$imports{$_} } ).join(', ')
  24. }
  25. $imports
  26. }
  27. else {
  28. Map.new
  29. }
  30. }
  31.  
  32. ##########
  33. Main script test.raku is just:
  34. #!/bin/env raku
  35. use Tests;
  36.  
  37. ./test.raku ==>
  38. When i run that for the first time : I get a list of symbols displayed:
  39. Mu
  40. "BGND_256_MASQ" => 65280
  41. "uInt16" => Colors::uInt16
  42. "LBLACK" => 8
  43. "BLACK" => 0
  44. "LIBGMSK" => 128
  45. [ .... ]
  46.  
  47. But when i run that on the second time, i get nothing, no List, no error.
  48. WHY ???????????????????????????????????????????????
  49. I suppose there's some cache tricks or else...
  50.  
  51. What can i do to have it displayed all the time.
  52. Thanks!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement