package RakuAST::VersionLiteral
class RakuAST::VersionLiteral { }
The RakuAST::VersionLiteral class represents a version (such as
`v6.e`).
Object introspection
RakuAST::VersionLiteral objects are typically created when parsing
Raku Programming Language code. So most developers will only need to
know how to introspect the objects created.
These introspection methods are available (in alphabetical order):
value
say $literal.value;
The value method returns the value it is representing.
Object creation
There is one way to create a RakuAST::VersionLiteral object directly
(rather than having RakuAST::Literal.from-value figure it out):
new
my $literal = RakuAST::VersionLiteral.new(v6.e);
say $literal.^name; # RakuAST::VersionLiteral
Creates a RakuAST::VersionLiteral object from the given value.
Assumes the value is really a Version, does not do any sanity
checks.