August 1999 Return to the Perl Hardware Store Slide #17

Self-Replacing Stub

        sub croak {
          require Carp;
          *croak = \&Carp::croak;
          goto &croak;
        }
        croak("I am not a number.  I am a free man.");


Next Copyright © 1999 M-J. Dominus