Hmm.

Each module consists of only the constructor. Everything else is handled by the superclass.

If I can have one module that consists of (currently, though it's not finished) around 100 lines of executable code, and one line of data for each of the several hundred types involved, versus one superclass of 100 hundred lines and an 8 line module for each of the several hundred types, I prefer the former to the latter.

Further more, the data lines are extracted from header files using another script. The header files are subject to changes. These are infrequent, but I'd rather just re-generate the DATA section of one module when required than fuss with maintaining several hundred, small and essentially identical modules.

I did look at several possible candidates for doing this before I started including Class:Struct , Inline::Struct, C::Dynalib::Struct and Win32::API::Struct, but felt that none of them met my requirements for

Basically I thought I could do better, and I do not have the commercial pressures upon me to do it in any give time frame, so I am going ahead with my design. Whether the result will meet my own requiements will take a few more days to verify.

Whether others will consider my efforts worthwhile I won't know unless I publish the code...which I may do if I am satisfied with the result.

I really tried to avoid this whole discussion by asking a very specific question. It's difficult to argue the merits for or against what I'm doing without getting into a full blown description of the entire project, which I'm not in a position to do right now.

When the project is completed, I might work up a comparison between my solution and one or two of the other possibilities suggested and throw it out for discussion. It might be interesting thing to do if anyone else would be interested.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.


In reply to Re: Re7: The costs of packages by BrowserUk
in thread The costs of packages by BrowserUk

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.