ContainerProps

ROLE

Config::BINDish::Grammar::ContainerProps - common properties of container statements

DESCRIPTION

Does Config::BINDish::Grammar::TypeStringify.

A container statement is the one which can contain a value. The only two pre-declarable kind of statements currently supported: options and blocks – are both containers.

ATTRIBUTES

List(Str) $.value-sym

List of sym names of value token, allowed for this kind of container. For example, if we want an option foo to only accept numeric values then this list must contain int, num, and rat. In this case the grammar will only attempt to match option value using tokens value:sym<int>, value:sym<num>, and value:sym<rat>, respectively.

Mu $.type

Must be a type object, which is the type this container is constrained to. Can be a Junction in which case the type of possible container value is matched against the junction. For example: Num | Rat would restrict the container to only Num or Rat values.

$.type-name

Contains allowed type name for this container. For example, to restrict a container to keywords only $.type must be set to Str, and type name set to "keyword".

METHODS

ACCEPTS(Config::BINDish::Grammar::Value:D $val)

Returns True if $val matches this container constraints on data type and type name.

SEE ALSO

COPYRIGHT

(c) 2023, Vadim Belman <[email protected]>

LICENSE

Artistic License 2.0

See the LICENSE file in this distribution.

Config::BINDish v0.0.18

Extensible BIND9-like Configuration Files Support

Authors

  • Vadim Belman

License

Artistic-2.0

Dependencies

AttrX::Mooish:auth<zef:vrurg>:ver<1.0.0+>:api<1.0.*>IP::AddrTest::Async:auth<zef:vrurg>:ver<0.1.2+>

Test Dependencies

Provides

  • Config::BINDish
  • Config::BINDish::AST
  • Config::BINDish::Actions
  • Config::BINDish::Expandable
  • Config::BINDish::Grammar
  • Config::BINDish::INET
  • Config::BINDish::Ops
  • Config::BINDish::Test
  • Config::BINDish::X

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.