Sub::Regex - Creating Synonymous Subroutines


Sub-Regex documentation  | view source Contained in the Sub-Regex distribution.

Index


NAME

Top

Sub::Regex - Creating Synonymous Subroutines

SYNOPSIS

Top

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

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

DESCRIPTION

Top

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

Top

xern <xern@cpan.org>


Sub-Regex documentation  | view source Contained in the Sub-Regex distribution.