deprecated has asked for the wisdom of the Perl Monks concerning the following question:
i'm trying to compartmentalize an api that i am writing.
im doing something like this:
the problem is, if sub_two is a help sub, i need it to be able to call all of the subs in @children, including itself.my @children = ( \&sub_one, \&sub_two, ); foreach my $child (@children) { if ($child -> (args)) { # $child was successful } else { # $child was unsuccessful } }
i suspect making my @children into our @children, i would solve my problem, but that strikes me as rather inelegant.
how can i make my children able to see eachother?
thanks,
brother deprecated
--
Laziness, Impatience, Hubris, and Generosity.
Back to
Seekers of Perl Wisdom