PAST::Pattern::Constant - A PAST::Pattern subclass for exact matching of constants.
A PAST::Pattern::Constant matches objects that are equal to(according to the is_equal vtable) its value.
A PAST::Pattern::Constant contains a constant value. This constant value specifies what objects the pattern matches. The pattern matches if the is_equal vtable of the value produces a true result when called with the object to be matched.
PAST::Pattern::patternize produces a PAST::Pattern::Constant when called with an object which neither has an ACCEPTS method nor provides the invokable role.
The value attribute holds the constant value that must be equal to any matching objects. If the value lacks an is_equal vtable, the ACCEPTSEXACTLY method will throw an exception.
Creates a PAST::Pattern::Constant with value as its constant target value.
If new_value is provided, set the value attribute of the pattern to new_value. Otherwise, return the current value of the value attribute.
Used internally by the inherited ACCEPTS method to determine whether a node exactly matches the pattern.