The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Sub::Regex - Creating Synonymous Subroutines

SYNOPSIS

use Sub::Regex;
sub /look(s|ing)?_for/ ($){
   foobar blah blah
}

look_for('Amanda');
looks_for('Amanda');
looking_for('Amanda');
lOoKiNg_fOr('Amanda');

DESCRIPTION

Sub::Regex is a small tool for users to create a subroutine with multiple names. The only thing to be done is replace the normal name of a subroutine with a regular expression. However, regexp modifiers are not allowed, and matching is all considered case-insensitive.

AUTHOR

xern <xern@cpan.org>