txt: ## versioning.md
  role Metamodel::Versioning
  
  Metaobjects that support versioning
  
  ```raku
  role Metamodel::Versioning { ... }
  ```
  
  *Warning*: this role is part of the Rakudo implementation, and is not a part of the language specification.
  
  [Metamodel](/language/mop) role for (optionally) versioning metaobjects.
  
  When you declare a type, you can pass it a version, author, and/or API and get them, like so:
  
  ```raku
  class Versioned:ver<0.0.1>:auth<github:Kaiepi>:api<1> { }
  
  say Versioned.^ver;  # OUTPUT: «v0.0.1␤»
  say Versioned.^auth; # OUTPUT: «github:Kaiepi␤»
  say Versioned.^api;  # OUTPUT: «1␤»
  
  ```
  
  This is roughly equivalent to the following, which also sets them explicitly:
  
  ```raku
  BEGIN {
      class Versioned { }
      Versioned.^set_ver:  v0.0.1;
      Versioned.^set_auth: 'github:Kaiepi';
      Versioned.^set_api:  <1>;
  }
  
  say Versioned.^ver;  # OUTPUT: «v0.0.1␤»
  say Versioned.^auth; # OUTPUT: «github:Kaiepi␤»
  say Versioned.^api;  # OUTPUT: «1␤»
  
  ```
  
  # [Methods](#role_Metamodel::Versioning "go to top of document")[§](#Methods "direct link")
  
  ## [method ver](#role_Metamodel::Versioning "go to top of document")[§](#method_ver "direct link")
  
  ```raku
  method ver($obj)
  ```
  
  Returns the version of the metaobject, if any, otherwise returns [`Mu`](/type/Mu).
  
  ## [method auth](#role_Metamodel::Versioning "go to top of document")[§](#method_auth "direct link")
  
  ```raku
  method auth($obj)
  ```
  
  Returns the author of the metaobject, if any, otherwise returns an empty string.
  
  ## [method api](#role_Metamodel::Versioning "go to top of document")[§](#method_api "direct link")
  
  ```raku
  method api($obj)
  ```
  
  Returns the API of the metaobject, if any, otherwise returns an empty string.
  
  ## [method set\_ver](#role_Metamodel::Versioning "go to top of document")[§](#method_set_ver "direct link")
  
  ```raku
  method set_ver($obj, $ver)
  ```
  
  Sets the version of the metaobject.
  
  ## [method set\_auth](#role_Metamodel::Versioning "go to top of document")[§](#method_set_auth "direct link")
  
  ```raku
  method set_auth($obj, $auth)
  ```
  
  Sets the author of the metaobject.
  
  ## [method set\_api](#role_Metamodel::Versioning "go to top of document")[§](#method_set_api "direct link")
  
  ```raku
  method set_api($obj, $api)
  ```
  
  Sets the API of the metaobject.
  