Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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 ( [id://1066158]=note: print w/replies, xml ) Need Help??


in reply to Re^2: 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()?

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
  • Comment on Re^3: How can I get Perl via Carp, to SCREAM -- more informative output via cluck(),confess(),longmess()?
  • Select or Download Code

Replies are listed 'Best First'.
Re^4: How can I get Perl via Carp, to SCREAM -- more informative output via cluck(),confess(),longmess()?
by taint (Chaplain) on Dec 07, 2013 at 23:09 UTC
    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.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1066158]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found