in reply to Re: Code references as use() parameters
in thread Code references as use() parameters

I'd like to be clear here that Alzabo::MethodMaker is only an example and that I intended to ask for ideas for handling this problem in the general case.

  • Comment on Re: Re: Code references as use() parameters

Replies are listed 'Best First'.
Re: Re: Re: Code references as use() parameters
by MarkM (Curate) on Apr 09, 2003 at 17:04 UTC

    I think I was clear that in the general case, as long as the subroutine is not invoked as part of the 'use', there is no problem. If the subroutine is invoked, then it needs to have already been defined. Only taking the reference of an as-yet-non-existent subroutine is not dangerous.

    Actually, there is one danger, and it has to do with prototypes. If the prototypes differ (when the function actually is defined), Perl will croak.