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...
Alodie asked 21/1, 2021 at 21:21

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...
Cimino asked 21/1, 2021 at 20:0

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?
Kalina asked 12/1, 2020 at 23:14

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....
Adopted asked 18/2, 2014 at 16:59

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'...
Jehiel asked 9/12, 2009 at 23:19

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(...) ...
Garrulous asked 19/10, 2009 at 2:26

4

Solved

People keep giving me examples with carp instead of warn. Why? What makes carp better than warn?
Room asked 9/10, 2008 at 19:10
1

© 2022 - 2024 — McMap. All rights reserved.