NAME

SPVM::Regex::Replacer - an interface type for the callback for the regex replacement

SYNOPSYS

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);

DESCRIPTION

Regex::Replacer is an interface type for the callback for the regex replacement.

INTERFACE METHOD

required method : string ($re : Regex)

This method return the string after the replacement.

This method will be implemented as a anon method.