*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> perl5/Carp (3)              
Title
Content
Arch
Section
 

Contents


Carp(3)								       Carp(3)


NAME    [Toc]    [Back]

     carp    - warn of errors (from perspective	of caller)

     cluck   - warn of errors with stack backtrace
	       (not exported by	default)

     croak   - die of errors (from perspective of caller)

     confess - die of errors with stack	backtrace

SYNOPSIS    [Toc]    [Back]

	 use Carp;
	 croak "We're outta here!";

	 use Carp qw(cluck);
	 cluck "This is	how we got here!";

DESCRIPTION    [Toc]    [Back]

     The Carp routines are useful in your own modules because they act like
     die() or warn(), but report where the error was in	the code they were
     called from.  Thus	if you have a routine Foo() that has a carp() in it,
     then the carp() will report the error as occurring	where Foo() was
     called, not where carp() was called.

     Forcing a Stack Trace    [Toc]    [Back]

     As	a debugging aid, you can force Carp to treat a croak as	a confess and
     a carp as a cluck across all modules. In other words, force a detailed
     stack trace to be given.  This can	be very	helpful	when trying to
     understand	why, or	from where, a warning or error is being	generated.

     This feature is enabled by	'importing' the	non-existant symbol 'verbose'.
     You would typically enable	it by saying

	 perl -MCarp=verbose script.pl

     or	by including the string	MCarp=verbose in the the PERL5OPT manpage
     environment variable.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
gp_overflow IRIX GP Overflow Errors
crterrhdlr IRIX handle X protocol errors
spell OpenBSD find spelling errors
spellout Tru64 Finds spelling errors
spellin Tru64 Finds spelling errors
spell Tru64 Finds spelling errors
spell IRIX find spelling errors
adderrinfo IRIX record information about errors
hashcheck HP-UX find spelling errors
spell HP-UX find spelling errors
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service