1. role Systemic {
  2. has Str $.name;
  3. has Str $.auth;
  4. has Version $.version;
  5. has Blob $.signature;
  6. has Str $.desc;
  7. submethod BUILD(
  8. :$!name = "unknown",
  9. :$!auth = "unknown",
  10. :$!version = Version.new("unknown")
  11. --> Nil
  12. ) { }
  13. multi method gist(Systemic:D:) {
  14. $.name ~ (" ($!version)" if $.version.gist ne "vunknown")
  15. }
  16. method Str { $.name }
  17. }
  18. # Since we cannot see attributes of roles done by other roles, the below is
  19. # a copy of the above (minus .desc), instead of doing the Universal role in
  20. # Systemic (as is the spec). Once we can see attributes of roles of roles
  21. # inside a class, we can fix this abomination.
  22. role Universal {
  23. has Str $.name;
  24. has Str $.auth;
  25. has Version $.version;
  26. has Blob $.signature;
  27. submethod BUILD(
  28. :$!name = "unknown",
  29. :$!auth = "unknown",
  30. :$!version = Version.new("unknown"),
  31. --> Nil
  32. ) {}
  33. multi method gist(Universal:D:) {
  34. $!name ~ (" ($!version)" if $!version.gist ne "vunknown")
  35. }
  36. method Str { $!name }
  37. }