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.


In reply to RE: Re: Templating and Programmatic Block Manipulation in Perl by princepawn
in thread Templating and Programmatic Block Manipulation in Perl by princepawn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.