On Apr 5, 2007, at 4:06 AM, Ovid wrote: > That's an important backup and one I recommend. However, I don't want > to see a permissions error hundreds of lines and several modules away > from the actual cause: > > $mc->hammer("can't touch this"); > > It's important to have the exceptions thrown as close to the code > causing it as possible, particularly since large systems can make it > very hard to find out where the offending line is.
Like i said, I'm lazy. Any chance of these features being pushed back into rose? On Apr 4, 2007, at 12:57 PM, John Siracusa wrote: > No, since that'd require extra overhead for all RDBO-derived objects. > Better to make Rose::DB::Object::ReadOnly or something similar > which would > override init() as shown and add an exception on_set for every > column when > not init()ializing. Anyone should feel free to code, document, and > write > tests for such a thing and then submit it to me :) Personally, I wouldn't mind seeing something like this ( forgive the braindump , perhaps someone has a better idea ) my $obj= MyApp::RoseDb::Object::Foo->new( id=1 ); #pulls default meta my $readOnly= MyApp::RoseDb::Object::Foo->new( readonly=> 1 , from_obj= $obj ); or my $readOnly= MyApp::RoseDb::Object::ReadonlyFoo->clone_from ( from_obj= $obj ); or my $readOnly= $obj >clone( readonly=> 1 ); which would be something akin to my $writer= MyApp::RoseDb::Object::Foo->new( id=1 ); my $reader= MyApp::RoseDb::Object::ReadonlyFoo-> init_with_column_value_pairs( $writer->column_value_pairs ); or my $reader= $writer->clone(); bless( $reader , MyApp::RoseDb::Object::ReadonlyFoo ); // 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 Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object