Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pdcawley (485)

  (email not shown publicly)
AOL IM: pdcawley (Add Buddy, Send Message)

Journal of pdcawley (485)

Tuesday December 24, 2002
01:16 AM


[ #9613 ]

Pixie, the Object persistence system I've been working on for the past few months just got picked for the Perl Advent Calendar. Which means I should really pester James, who is Pixie's CPAN owner into releasing the latest code which fixes some DBI locking issues and finally adds Garbage Collection.

I note too that one of the classes that Mark uses as an example of a class that will Just Work with Pixie is 'URI', which doesn't quite work out of the box -- it uses a blessed scalar ref as its representation, which Pixie assumes is unstorable as it stands -- blessed scalars are the commonest placeholder for objects that store their state elsewhere via XS so Pixie assumes they're unstorable. In the case of URI, which doesn't store any extra data anywhere, the fix is simple, just do sub URI::px_is_storable { 1 } somewhere and your problem is solved. I wonder if there's a case for keeping a list of 'known good' classes like URI so people don't have to jump through even that small hoop...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I changed the example to use a Math::BigInt instead.

    I was thinking about all of this. What Pixie really needs is big collection of Complicity code that can be loaded as and when needed. I was thinking maybe a coderef in @INC to check what modulss are being loaded and to load the associated complicty code at the same time for anything it knows about.

    What do you think?

    At very least, we could do with a web page that has known good, known bad, and known solutions pulished to it.

    • I've not really thought about it that hard to be honest. I'm considering adding a Pixie::Memento helper class to the distribution which would at least make the pattern involved explicit.

      Of course, if Pixie became ubiquitous it'd be easy -- module authors would simply provide an 'official' px_freeze and px_thaw. Well, a chap can dream can't he?
      • How about a global flag that turns off the checks on storing a scalar to make it storable? Users that know what they're doing might be happier with that smaller hoop to jump through. Alternatively, you could look to see if the class that the blessed scalar belongs to has made friends with Dynaloader or Inline::*.


        -- Robin Berjon []

  • Once I get back into work on the 3rd I'll get going with another release.