TaskPipe::MatchHandler - handling matching of parameter values in the plan
TaskPipe::MatchHandler is the base class responsible for interpolating parameters in the plan which are set as a particular variable (e.g. $this). To create a match handler for a new variable, this class should be inherited from. The minimum package to create a new plan variable is the empty package which inherits from TaskPipe::MatchHandler:
$this
package TaskPipe::MatchHandler_myvar; use Moose; extends 'TaskPipe::MatchHandler'; 1;
This defines a parameter variable $myvar which behaves just like $id. The variable is taken from the name of the package.
$myvar
$id
If you add this module and TaskPipe sees $myvar in the plan, it will look for the label _myvar and replace the input in the same way as it would for _id.
_myvar
_id
Why would you want to do this? I have no idea. It's probably more likely that, if you are wanting to create a new parameter variable, you want it to have some unique behaviour.
In this case you may want to override one or more of the methods match_condition, format_valid and/or match_index.
match_condition
format_valid
match_index
Tom Gracey <tomgracey@gmail.com>
Copyright (c) Tom Gracey 2018
TaskPipe is free software, licensed under
The GNU Public License Version 3
To install TaskPipe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TaskPipe
CPAN shell
perl -MCPAN -e shell install TaskPipe
For more information on module installation, please visit the detailed CPAN module installation guide.