++ed by:
FAYLAND KES POTATOGIM ILUX BEROV

13 PAUSE users
5 non-PAUSE users.

Yuki Kimoto

NAME

SPVM::Regex::Replacer - a callback type for the regex replacement

SYNOPSYS

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

DESCRIPTION

SPVM::Regex::Replacer is a callback type for the regex replacement

CALLBACK METHOD

  sub : string ($self : self, $re : SPVM::Regex)

This method must return a string for replacement in the method implementation.