This is more of a curiosity question than a possible bug report.  I have
a customized layer on top of DBI which includes code to enable the
Profile feature; however, the installation of the upgraded DBI package
that supports Profile was delayed.  As a result, my code looks like--

    local($connection->{PrintError}) = 0;
    local($connection->{RaiseError}) = 1;
    if ($conn_is_new or !eval { $connection->{Profile} }) {
      my $profile_level;
      if ($debug == 0) {
        $profile_level = 0;
      } elsif ($debug > 4) {
        $profile_level = 6;
      } elsif ($debug) {
        $profile_level = 2;
      }
      eval { $connection->{Profile} = $profile_level; 1 }
        or logdbg 1, 'Profile is not enabled, skipping';
    }

My question is: how can I suppress messages such as this:

Can't set DBI::db=HASH(0x8efe548)->{Profile}: unrecognised attribute or
invalid value

I tried to do so in the code above by clearing PrintError, but
apparently the error generated by assigning to $db->{Profile} is coming
from somewhere so deep inside the DBI code that it's not honoring
PrintError (or eval{}, for that matter!).

-- 
Jeff Boes                                      vox 616.226.9550 ext 24
Database Engineer                                     fax 616.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
           ...Nexcerpt... Extend your Expertise

Reply via email to