heh. for some definitions of "poorly".

Problem:
Trying to allow lazy maintenance of multiple interface widgets, frinstance Receipt::DoubleA, Receipt::TextOnly, Receipt::BannerAds, etc

at a level above the widgets, we have an AUTOLOAD that allows us to call $ui->Receipt->build(%args), and it will use the Receipt parent class or choose the right subclass based on external criteria.

The problem is, for example, that we might have a Text subclass under Receipt, but not have one under Error.

In that case we could

  • 1) mandate the creation of an "empty" subclass for every widget for each new interface, with at minimum an @ISA statement
  • 2) descend into some inelegant evalling or -e testing at some level (perhaps in the parent widget class), or
  • 3) see if there might be a way to check from upstream if in fact there was a Text interface for a particular widget before trying to AUTOLOAD it.
  • 4) accept new and novel suggestions from perlmonks, et al.

    Ideally, without keeping a separate registry hash of available interfaces, of course ;)

    As you noted, perhaps too tricky. The extenuating circumstances of how we got here are lengthy and boring.

    {::} =D------an (sometimes the cord just doesn't quite reach)


    In reply to (dan2bit) Re: (Ovid) Re: is there a way to check @ISA from upstream? by dan2bit
    in thread is there a way to check @ISA from upstream? by dan2bit

    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.