Aha!
I thought about your comments above. And I have a prototype for how it works.
package HostCycle;
$ftp_host = undef;
sub until { ; }
sub then { ; }
sub cycle {my $self=shift;
for $ftp_host (@ftp_host) {
my $retval = $self->until($ftp_host);
if ($retval) { $self->then($ftp_host); }
else { ++$error_count; }
package SendOrder;
@ISA=qw(HostCycle);
sub until { # Wait for upfile to disappear }
sub then { # Upload orderfile and upfile }
package GetOrder
@ISA=qw(HostCycle};
sub until { # Wait for downfile to disappear }
sub then { # Download all files in directory }
And of course regarding runtime alteration of code blocks: when was the last time you needed that? Answer: when you are trying to create your model as metaphorical to the language as opposed to creating a model with the language. Douglas Hofstadter in "Goedel, Escher, Bach: The Eternal Golden Braid" tried to say that we needed self-modifying, self-reflective languages. But in actually we just need to ability to modify and study structures.
|