Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^3: Compact data classes

by BrowserUk (Pope)
on Jun 09, 2013 at 19:47 UTC ( #1037950=note: print w/replies, xml ) Need Help??

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

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.

Replies are listed 'Best First'.
Re^4: Compact data classes
by Anonymous Monk on Jun 10, 2013 at 16:52 UTC
    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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037950]
and all is calm...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2018-06-24 19:31 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.