txt: ## required.md
  class X::Attribute::Required
  
  Compilation error due to not declaring an attribute with the `is required` trait
  
  ```raku
  class X::Attribute::NoPackage does X::MOP { }
  ```
  
  Compile time error thrown when a required attribute is not assigned when creating an object.
  
  For example
  
  ```raku
  my class Uses-required {
      has $.req is required
  };
  my $object = Uses-required.new()
  
  ```
  
  Dies with
  
  ｢text｣ without highlighting
  
  ```
  
  
  ```
  
  OUTPUT: «(exit code 1) The attribute '$!req' is required, but you did not provide a value for it.␤»
  
  
  ```
  
  
  ```
  
  # [Methods](#class_X::Attribute::Required "go to top of document")[§](#Methods "direct link")
  
  ## [method name](#class_X::Attribute::Required "go to top of document")[§](#method_name "direct link")
  
  ```raku
  method name(--> Str:D)
  ```
  
  Returns the name of the attribute.
  
  ## [method why](#class_X::Attribute::Required "go to top of document")[§](#method_why "direct link")
  
  ```raku
  method why(--> Str:D)
  ```
  
  Returns the reason why that attribute is required, and it will be included in the message if provided. That reason is taken directly from the `is required` trait.
  
  ```raku
  my class Uses-required {
      has $.req is required("because yes")
  };
  my $object = Uses-required.new();                                  │
  # OUTPUT:
  # «(exit code 1) The attribute '$!req' is required because because yes,␤
  # but you did not provide a value for it.␤»
  
  ```
  