Next Tricks of the Wizards 122

The Self-Replacing Stub

        sub croak {
          require Carp;

          *croak = \&Carp::croak;
          goto &croak;
        }


Next Copyright © 2003 M. J. Dominus