in reply to CGI::Session raises inconsistent error 'Can't modify constant item in scalar assignment'
Perhaps you could use caller within a $SIG{__DIE__}/$SIG{__WARN__} handler to trap the error and dump some additional information. Hopefully the call stack will give you enough information to find the error. Otherwise you may need to dump the arguments to each of the routines in the call stack.