carp Questions
1
Solved
According to the perldoc -f die, which documents $SIG{__DIE__}
Although this feature was to be run only right before your program was to exit, this is not currently so: the $SIG{__DIE__} hook is c...
1
Solved
Let's say you use a cpan (or otherwise external) module, like our fictional one here Stupid::CPAN::Module::OfSatan
package Stupid::CPAN::Module::OfSatan {
BEGIN { $SIG{__DIE__} = sub { print STDER...
2
By default, Raku's "die" reports the line number where the "die" is located, what if you'd like the line number of the calling context, ala "carp" with perl 5?
2
Solved
I have the same problem as in Can't disable stack trace in Carp::croak() for some reason. Because every call in the stack is considered "safe", croak() prints out a full stack trace every time....
2
Solved
I haven't used Carp all that much because I've generally rolled my own. However, in the spirit of keeping with Core modules, I'm using it now. However, it seems like it's barely better than warn/di...
Avocation asked 1/10, 2011 at 2:52
4
Solved
I'm working in a large Perl application and would like to get stack traces every time 'die' is called. I'm aware of the Carp module, but I would prefer not to search/replace every instance of 'die'...
4
In some projects I've done in C, I've liked using the following macros which work similar to Perl's warn and die subroutines:
#include <stdio.h>
#include <stdlib.h>
#define warn(...) ...
4
Solved
People keep giving me examples with carp instead of warn. Why? What makes carp better than warn?
1
© 2022 - 2024 — McMap. All rights reserved.