in reply to Re: subroutine ref while "strict refs"
in thread subroutine ref while "strict refs"

If anyone adds a subroutine, you will at least need a new 'use' statement to reference it. There does not seem to be much advantage in eliminating the need for other changes. Use a method that is clear and easy to modify. I like the dispatch table. Add a new entry for each new subroutine.
Bill
  • Comment on Re^2: subroutine ref while "strict refs"

Replies are listed 'Best First'.
Re^3: subroutine ref while "strict refs"
by Anonymous Monk on Jul 28, 2014 at 13:34 UTC
    If anyone adds a subroutine, you will at least need a new 'use' statement to reference it.

    What?

      I understood that the OP considered his symbolic references an advantage because a user could add new subroutines without modifying the original script. My point is that it is unlikely that this is possible. The additional effort to add a hard reference to a dispatch table is insignificant if you have to modify the script anyway.
      Bill
        The sub routines will all be in a module which will obviously need a 'use' statement to reference it, so if adding a new sub routine to the hash table, only the called module will need to be updated.