Re: Error.pm and DBI.pm problem

From: Anno Siegel (anno4000_at_lublin.zrz.tu-berlin.de)
Date: 10/10/04

  • Next message: Anno Siegel: "Re: Top 10 list algorithm"
    Date: 10 Oct 2004 12:43:57 GMT
    
    

    Horst Walter <unkwb@web.de> wrote in comp.lang.perl.misc:

    Don't top-post. I have moved your reply where it belongs, after what
    you are replying to,

    > peter@PSDT.com (Peter Scott) wrote in message
    > news:<x8b9d.17813$a41.15681@pd7tw2no>...
    > > In article <53867fbe.0410060715.7948a734@posting.google.com>,
    > > unkwb@web.de (Horst Walter) writes:

    > > >Yes, this is what I have guessed. But I tried many things and was not
    > > >able to do it.
    > > >
    > > >I used
    > > >use Error qw(:try);
    > > >
    > > >as in all the examples for error.pm. I have tried several tings as
    > > >use Error qw(:try with);
    > > >
    > > >but none of them worked.
    > > >It would be great if somebody had an example on this.
    > >
    > > Post the shortest *complete program* you can construct that
    > > demonstrates the problem please. I have never had problems
    > > with Error.pm and DBI and cannot reproduce your problem.

    > sub oracleLogoff ($) {
    > my ($dbh) = @_;
    > if (!defined $dbh) {
    > return;
    > }
    >
    > # avoid any trouble during close
    > try {
    > $dbh->disconnect;
    > } catch Error with {
    > # ignore the error
    > };
    > }
    >
    >
    > Error
    > Error: Can't call method "with" without a package or object reference
    > at autodb.pm line 181. ("catch Error with") line

    That is *not* a complete program. A complete program is one that can
    be copied and pasted into a file and run. In particular, yours doesn't
    show how you load the Errors module.

    Have you read the documentation of Errors.pm? Especially what it says
    about an export tag named ":try"?

    Anno


  • Next message: Anno Siegel: "Re: Top 10 list algorithm"

    Relevant Pages

    • Re: First C Program, Problems getting serial data
      ... Please don't top-post. ... Your reply belongs below, or interspersed with the text you're replying ... The only "intuitive" interface is the nipple. ...
      (comp.lang.c)
    • Re: PDF overprint knock out help pls
      ... Thanks I jumped the gun on replying to fast....so sorry about that... ... Gumby ... The choice of whether to top-post or not is not a ...
      (comp.publish.prepress)
    • Re: Confused over validation
      ... >> I used to mainly top-post when replying to an entire post, ... > quotes under the sig separator. ...
      (microsoft.public.windowsxp.general)
    • Re: New to group and have a question
      ... DO NOT TOP-POST! ... Bottom posting: what you did in the prior post, and what I'm doing now: putting the new material AFTER what you're replying to, so it's seen in context. ...
      (rec.arts.sf.written)
    • Re: LXDE background shows my entire /home/USER as icons.
      ... suggesting to top-post and having this list as reply-to address. ... Spamming many users on debian-user ... Replying randomly to emails ...
      (Debian-User)