in reply to Re: Compact data classes
in thread Compact data classes

Wait, where is this magical Class::Struct::Compact? It's not in CPAN afaict?

Replies are listed 'Best First'.
Re^3: Compact data classes
by BrowserUk (Patriarch) on Jun 09, 2013 at 19:47 UTC

    As hdb points out, it's in the spoiler at the end of my post.

    It's not on cpan because I wrote it -- actually adapted it from some existing code -- in reponse to your OP.

    I'd want to use a few times myself and see what else it needs before putting it out for general use. For starters it needs some error checking and Carp for when things go wrong.

    It'd also be nice to use pack templates to allow for numeric fields; but then it I'd have to drop the lvalue-ness of the accessors.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Doh! I see it. This is very clever; compiled class and substr(). The only apparent downside is the fixed record length, but I could probably find a workable value for them. Given the roughly 5x overhead of Class::Struct, the savings ought to be well worth it. Let me PM you about error checking, etc. Thanks so much.
Re^3: Compact data classes
by hdb (Monsignor) on Jun 09, 2013 at 17:59 UTC