SPVM::Regex::Replacer - Regex::Replacer in SPVM | a callback interface for the regex replacement
use Regex::Replacer; my $replacer : Regex::Replacer = method : string ($re : Regex) { return "AB" . $re->captures->[0] . "C"; }); my $re = Regex->new("ab(c)"); my $string_for_replace = $replacer->($re);
Regex::Replacer is a callback interface for the regex replacement.
method : string ($re : Regex)
This method return the string after the replacement.
This method is planned to be implemented in other classes.
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM
CPAN shell
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.