Pugs::Runtime::Match - Match object created by rules


Pugs-Compiler-Rule documentation  | view source Contained in the Pugs-Compiler-Rule distribution.

Index


NAME

Top

Pugs::Runtime::Match - Match object created by rules

METHODS

Top

* array

- return the positional matches

* hash

- return both the named and positional (numbered) matches

* str

- return the stringified capture object. If there is no capture, return the matched substring

* scalar

- return the capture object If there is no capture, return the matched substring

* bool

- return whether there was a match

* from

- return the string position (a Pugs::Runtime::StrPos object) where the match started.

* to

- return the string position (a Pugs::Runtime::StrPos object) immediately after where the match finished.

* from_as_codes * to_as_codes

- same as from/to methods, but return perl5 integers.

"Hash" methods

Top

* elems

* kv

* keys

* values

"Str" methods

Top

* chars

OVERLOADS

Top

* $$match

- return the capture object

* $match->[$n]

- return the positional matches

* $match->{$n}

- return the named matches

* $match ? 1 : 0

- return whether there was a match

Dumper methods

Top

* data

- return the internal representation as a data structure.

* perl

- return the internal representation as Perl source code.

* yaml

- return the internal representation as YAML. Requires the YAML::Syck module.

* dump_hs

- for Pugs interoperability

SEE ALSO

Top

v6 on CPAN

AUTHORS

Top

The Pugs Team <perl6-compiler@perl.org>.

COPYRIGHT

Top


Pugs-Compiler-Rule documentation  | view source Contained in the Pugs-Compiler-Rule distribution.