Error.pm and DBI.pm problem

From: Horst Walter (unkwb_at_web.de)
Date: 10/05/04


Date: 5 Oct 2004 08:28:43 -0700

As a newbie to Perl I run into the following problem. With this I get
the following problem with the code below:

Can't call method "with" without a package or object reference at
autodb.pm line 163

I have tried "use Error qw(:try);" and "use Error". I am confused
since this try/catch block works in other parts of my code pretty
fine. It seems to have something to do with DBI.

Any hints would be appreciated.
Thanks!

        try {
                my ($dbh) = @_;
                unless ($dbh->disconnect) {
                        die("autodb::oracleLogoff $DBI::errstr");
                };
        }
        catch Error with {
                my $err = shift;
                print "autodb::oracleLogoff(..) $err";
        };



Relevant Pages

  • Cant locate DBI.pm in @INC error...
    ... used "use DBI" in my pm file. ... Any pointers will be very much ... A Perl newbie... ...
    (perl.dbi.users)
  • Re: Error.pm and DBI.pm problem
    ... Horst Walter wrote: ... > As a newbie to Perl I run into the following problem. ... It seems to have something to do with DBI. ...
    (comp.lang.perl.misc)
  • Re: Perl 6 DBI API ideas
    ... Though I didn't raise my hand when you asked for people to contribute to a DBI module for Perl 6, I've had some ideas that I thought about sharing. ... I would also love to see some standardization on the driver names ("mysql" when it's normally written ... DBI is supposed to be query language agnostic, even if SQL is the most commonly used group of languages, and if a user can declare this explicitly, it saves the driver from having to guess what they were given, which might be ambiguous. ...
    (perl.dbi.users)
  • Problem of DBI build
    ... I installed Oracle Application Server 4.0.8.2 included perl module. ... I need to installe DBI and DBD::Oracle module. ... You can install them any time after installing the DBI. ... line 318: error 1705: Function prototypes are an ANSI feature. ...
    (perl.dbi.users)
  • Problem of DBI build
    ... I installed Oracle Application Server 4.0.8.2 included perl module. ... I need to installe DBI and DBD::Oracle module. ... You can install them any time after installing the DBI. ... line 318: error 1705: Function prototypes are an ANSI feature. ...
    (perl.dbi.users)