On Apr 6, 2007, at 12:04 PM, Ovid wrote:
> On a side note, the code you posted for making things 'read only'
> seemed a bit complicated for me. I simply do something similar to
> this:
>
> package My::DataCentre;
>
> use base 'My::Rose::DB::Object';
>
> sub meta_class { 'My::Rose::DB::Metaclass::ReadOnly' }
>
> ...
>
> That way, there really doesn't need to be anything special in creating
> readonly objects. The metaclass properly handles everything for it.
Right.
I was just concerned about creating readonly objets from readwrite
and vice-versa
It would be an extension of your readonly.
Given something like you already have, but with a comparable
readwrite class:
My::DataCentre
use base 'My::Rose::DB::Object';
My::DataCentre::ReadOnly
use base 'My::DataCentre ';
sub meta_class { 'My::Rose::DB::Metaclass::ReadOnly' }
or
My::DataCentre
use base 'My::Rose::DB::Object';
sub meta_class { 'My::Rose::DB::Metaclass::ReadOnly' }
My::DataCentre::Writer
use base 'My::DataCentre ';
sub meta_class { 'My::Rose::DB::Metaclass' }
I'd want to be able to create a readwrite object from a readonly, and
vice versa
instead of doing an object class mutation, i'd rather have new object
that is makes use of existing helper methods like clone or
init_with_xxx , in the context of a clone style call or instantiation
hook
basically, i want to have my cake and eat it too.
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object