in reply to Re: How can I get Perl via Carp, to SCREAM -- more informative output via cluck(),confess(),longmess()?
in thread How can I get Perl via Carp, to SCREAM -- more informative output via cluck(),confess(),longmess()?

Thanks for the reply, choroba

I replaced my call to system, with the one you noted. which returned

cat: MYFILE: No such file or directory Undefined subroutine &main::confess called at ./tester.cgi line 17.
Thanks again for the reply.

--Chris

Hey. I'm not completely useless. I can be used as a bad example.
  • Comment on Re^2: How can I get Perl via Carp, to SCREAM -- more informative output via cluck(),confess(),longmess()?
  • Download Code

Replies are listed 'Best First'.
Re^3: How can I get Perl via Carp, to SCREAM -- more informative output via cluck(),confess(),longmess()?
by tobyink (Canon) on Dec 07, 2013 at 22:28 UTC

    Undefined subroutine &main::confess

    This is because you forgot to import the confess function. You're importing cluck, longmess and shortmess but nothing else from Carp:

    use Carp qw(cluck longmess shortmess);

    Really, longmess and shortmess are unlikely to be much use in end-user code. They might be helpful if you were writing an extension to Carp.

    The four functions that are actually useful are croak, confess, carp, and cluck, and the least useful of these is cluck (which happens to be the only one of them that you're importing).

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
      Good points, tobyink.

      I should have caught the omission of confess, myself. Thanks for pointing it out. <blush>

      Thanks again.

      --Chris

      Hey. I'm not completely useless. I can be used as a bad example.