in reply to novice 'die' help requested

It sounds like it's time to move from simple error strings to exception objects. I like to use Exception::Class. Then you can do stuff like

eval { my $obj= ObjClass::Obj->new(); $obj->id( $id ); $obj->load_via_id() ; $res= $obj->id ; Exception::ActivatedAccount->throw unless $obj->activated_account; }; if( my $e = Exception::Class->caught ) { # handle exception and decide about logging here }

You can put any data you like into the exception object, including diagnostic messages and a flag which indicates whether or not to log it. Because you can create them in class hierarchies, you can make relatively clean exception handling code by checking if the exception object isa something you can deal with, and rethrowing it if it's not.