SPVM::Regex::Replacer - a callback type for the regex replacement
use SPVM::Regex::Replacer; my $replacer : SPVM::Regex::Replacer = sub : string ($self : self, $re : SPVM::Regex) { return "AB" . $re->caps->[0] . "C"; }); my $re = SPVM::Regex->new("ab(c)"); my $str_for_replace = $replacer->($re);
SPVM::Regex::Replacer is a callback type for the regex replacement
sub : string ($self : self, $re : SPVM::Regex)
This method must return a string for replacement in the method implementation.
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.