Setting error_mode for all object classes

30 views
Skip to first unread message

Olivier Salaün

unread,
Oct 26, 2012, 9:27:26 AM10/26/12
to rose-db...@googlegroups.com
Hello,

I need to change the error_mode from 'fatal' to 'undef' for all my
object classes.
I read this documentation
<http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.800/lib/Rose/DB/Object/Metadata.pm>
and also found this thread
<https://groups.google.com/forum/?fromgroups=#!msg/rose-db-object/InKWDeJUMRU/zOB6E7rsFKsJ>.


However I don't fully understand how to change the error mode for all my
classes at once?
I don't understand how subclassing can be achieved?

A simple example would greatly help...

Thanks.

--
Olivier Sala�n, p�le Services Applicatifs aux Utilisateurs
RENATER http://www.renater.fr
Tel : 02 23 23 71 27

Tom Adamo

unread,
Oct 30, 2012, 10:13:04 AM10/30/12
to rose-db...@googlegroups.com
Here's what I did, maybe it'll help you...

package Local::DB::Object;
use base 'Rose::DB::Object';
use Local::DB::Object::Metadata;
sub meta_class { return 'Local::DB::Object::Metadata'; }

package Local::DB::Object::Metadata;
use base 'Rose::DB::Object::Metadata';
sub init_error_mode { return 'undef'; }


All my classes inherit from Local::DB::Object, not Rose::DB::Object.


- Tom


On Friday, October 26, 2012 9:27:28 AM UTC-4, olivier...@cru.fr wrote:
Hello,

I need to change the error_mode from 'fatal' to 'undef' for all my
object classes.
I read this documentation
<http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.800/lib/Rose/DB/Object/Metadata.pm>
and also found this thread
<https://groups.google.com/forum/?fromgroups=#!msg/rose-db-object/InKWDeJUMRU/zOB6E7rsFKsJ>.


However I don't fully understand how to change the error mode for all my
classes at once?
I don't understand how subclassing can be achieved?

A simple example would greatly help...

Thanks.

--
Olivier Sala�n, p�le Services Applicatifs aux Utilisateurs
Reply all
Reply to author
Forward
0 new messages