http://qs321.pair.com?node_id=148845


in reply to Re: Confusion about properly using Carp
in thread Confusion about properly using Carp

He's calling carp() from Foo.pm, not DBI.pm, so this won't accomplish what he's asking.
  • Comment on Re: Re: Confusion about properly using Carp

Replies are listed 'Best First'.
Re: Re: Re: Confusion about properly using Carp
by Juerd (Abbot) on Mar 02, 2002 at 17:19 UTC
    I was thinking along the lines of: (warning: untested code ahead)
    package Foo; ... our $error; *DBI::carp = sub { $Foo::error = shift }; ... my $self->{dbh} = DBI->connect( ... ) or carp $error;

    Lbh ebgngrq guvf grkg naq abj lbh pna ernq vg. Fb jung? :) -- Whreq