Hyperscan::Matcher - high level matcher class
version 0.03
Construct a new matcher object using the @specs provided.
@specs
Accepts the following named arguments:
Flags that will be applied to all patterns, default: HS_FLAG_SOM_LEFTMOST.
HS_FLAG_SOM_LEFTMOST
Whether the specs provided should be compiled literally.
The underlying hyperscan mode to use, default: "block".
"block"
A spec can take a few forms
The string is used as the pattern, the flags are the default flags and the id is the index in the list.
A perl Regex object is broken down into it's pattern and flags. The flags are combined with the default flags and the id is the index in the list.
The first item is shifted and uses the String or Regex behaviour above. If the item is a string an additional item is shifted to be used as the flags. The next elements in the array are taken to be the id and the ext hash.
A hash with the following keys
A String or Regex.
Flags, ignored if a Regex is uses as the expr.
Explicit match ID.
An ext hash.
Scan the data for matches and return any results.
Flags to pass down into hyperscan.
Limit the number of matches found while scanning.
Resets the current stream and returns any remaining matches, for example matches that contain a $.
$
Mark Sikora <marknsikora@gmail.com>
This software is copyright (c) 2020 by Mark Sikora.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Hyperscan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hyperscan
CPAN shell
perl -MCPAN -e shell install Hyperscan
For more information on module installation, please visit the detailed CPAN module installation guide.