Search::Saryer - a perl interface of libsary
my $saryer = new Search::Saryer(filename=>'search.txt');
- new ( FILE )
- new ( OPTIONS )
- Create "Search::Saryer" object. If creation process was failed,
it returns undef. These following options are avaiable.
- This option is used to set the target file name.
- This option is the alias of "file".
- This option is used to set the array file name. It can be omitted.
- These options are aliases of "array".
If it is required to specify the array file name cleary, the following
expression can be used.
$sary = new Search::Saryer( file => "foo", array => "bar" );
- Destruct "Search::Saryer" object. It is automatically called by
destructor. It is unnecessary that this function is called
- grep ( PATTERN, [IGNORE_CASE] )
- Search for the PATTERN, and return the list of lines which include it.
When IGNORE_CASE is true, do case-insensitive search.
- look ( PATTERN, [START_TAG, END_TAG, IGNORE_CASE] )
- Search for the PATTERN, and return the list of regions which include it.
Each of them is surrounded by START_TAG and END_TAG. When IGNORE_CASE is
true, do case-insensitive search.
- Enable the cache engine. Cache the search results and reuse them for the
same pattern later.
- search ( PATTERN )
- Search for the PATTERN, and return true if success.
- icase_search ( PATTERN )
- Do case-insensitive search for the PATTERN, and return true if
- get_next_tagged_region ( START_TAG, END_TAG )
- Get the next search result of search/icase_search.