JockoHelios has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a set of subroutines which will call other subroutines within them. The first 4 subroutines are always going to be called in the same order to set up the data to be analyzed.
The last nested subroutine would be the actual analysis of the data.If subroutine calls have to be hard-coded, I'll need to copy and modify a seperate script for each analysis technique applied in that last subroutine. I'd also have to propogate any changes to main script to the copies.
Not a huge problem, but it would be helpful to be able to pass a reference to the desired analysis subroutine, along with the required parameters. I could do that via command-line parameters when running the script, instead of having a different script for each technique.Is this possible, or am I just asking for trouble ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Call subroutine by reference ?
by NetWallah (Canon) on May 31, 2013 at 03:23 UTC | |
by locked_user sundialsvc4 (Abbot) on May 31, 2013 at 10:48 UTC | |
by JockoHelios (Scribe) on May 31, 2013 at 17:09 UTC | |
|
Re: Call subroutine by reference ?
by LanX (Saint) on May 30, 2013 at 23:51 UTC | |
by JockoHelios (Scribe) on May 31, 2013 at 16:51 UTC | |
by LanX (Saint) on May 31, 2013 at 19:48 UTC | |
|
Re: Call subroutine by reference ?
by Anonymous Monk on May 30, 2013 at 23:48 UTC | |
|
Re: Call subroutine by reference ?
by locked_user sundialsvc4 (Abbot) on May 31, 2013 at 02:16 UTC | |
by JockoHelios (Scribe) on May 31, 2013 at 17:28 UTC |