in reply to Re (tilly) 2: Best/possible ways to dynamically use modules
in thread Best/possible ways to dynamically use modules

Is there any reason to use that goto instead of simply calling the sub, or are you just being perverse?
  • Comment on Re: Re (tilly) 2: Best/possible ways to dynamically use modules

Replies are listed 'Best First'.
Re (tilly) 4: Best/possible ways to dynamically use modules
by tilly (Archbishop) on Dec 18, 2001 at 21:52 UTC
    There is an extremely good reason to use it.

    Most import routines look at caller to figure out where they are exporting stuff to. If you want the function that I gave to be usefully called from multiple packages (and it is complicated enough that I would), then that function to not appear on the call-stack.

    The alternative would be to interact with the import to let it know where to export to. Unfortunately if the import does not use Exporter, the odds are low that there is any way to do that. And what I was promising was a way of getting the job done that would work with handrolled import methods.