Parrot::SearchOps - functions used in tools/dev/search-ops.pl
use Parrot::SearchOps qw( search_all_ops_files usage help ); $total_identified = search_all_ops_files( $pattern, $wrap_width, $opsdir ); usage(); help();
This package provides functionality for the Perl 5 program tools/dev/search-ops.pl, designed to replace the Python program tools/docs/search-ops.py. It exports two subroutines on demand.
search_all_ops_files()
Purpose: Searches all .ops files in src/ops/ for ops codes and their descriptions. Those that match the specified pattern are printed to STDOUT.
Arguments: Three scalars.
$pattern
Perl 5 regular expression. So concat will be matched by both concat and n_concat.
concat
n_concat
$wrap_width
In tools/dev/search-ops.pl, this is set to 70 characters. Can be varied during testing or development.
70
$opsdir
In tools/dev/search-ops.pl, this is set to src/ops/. Can be varied during testing or development.
Return Value: Number of times the pattern was matched by ops codes in all files.
usage()
Purpose: Display usage statement for tools/dev/search-ops.pl.
Arguments: None.
Return Value: Implicitly returns true upon success.
Return Value:
help()
Purpose: Display usage statement and more complete help message for tools/dev/search-ops.pl.
James E Keenan, adapting Python program written by Bernhard Schmalhofer.
To install Parrot::Op, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parrot::Op
CPAN shell
perl -MCPAN -e shell install Parrot::Op
For more information on module installation, please visit the detailed CPAN module installation guide.