Perly Q
2009-04-07 19:33:19.982747+00 by
Dan Lyke
2 comments
I've written some code to manage Flutterby.net, and in the process started using Perl's Moose and Mouse object packages. I'm totally in love, this makes Perl a reasonable OO language, pretty much takes away all of the advantages I thought Python had.
Except that I don't see the details of how to do introspection, which I can mostly work around, but... Is there a Moose/Mouse capable database system that'd deal with object persistence easily?
[ related topics:
Perl Open Source Work, productivity and environment Monty Python Databases Python
]
comments in ascending chronological order (reverse):
#Comment Re: made: 2009-04-07 23:44:37.125347+00 by:
John Anderson
I'm totally in love, this makes Perl a reasonable OO language, pretty much takes away all of the advantages I thought Python had.
Amen brother, Moose is all that and a bag of chips in a to-go bag.
For introspection, you want to look at the Class::MOP stuff that is underneath Moose. I don't think it's terribly well documented but I'm willing to bet the test suite is top-notch -- and if you're really stuck, I've got some "display classes with methods and attributes and what inherits from where" code that I can share sub-rosa that should help you figure out what to poke where.
For the database, you want to look at KiokuDB -- http://www.iinteractive.com/kiokudb/ -- which is an object-based persistence store. It's still pretty young but it's the same crew behind it as behind Moose in general.
#Comment Re: made: 2009-04-08 14:28:38.252715+00 by:
Dan Lyke
Thanks. I'm still using it at a very primitive level, but I think I see the hooks to make it sing.
Right now it takes a few seconds for me to scan all the source text files and images and build the dependency tree, a good persistence model should let me do some change detection so that I can rebuild this stuff on the fly. Of course it also means that I need to change a bit of my parsing model for things like Wiki links which shouldn't be resolved on parse, only on output, but it's good to do some abstract thinking, since my paying work right now is very concrete and low level C oriented.