In raku App::Crag ver<0.0.35>, I have placed this line at the start of the MAIN to suppress all the stack trace info when an error occurs...
# Redirect STDERR to /dev/null
$*ERR = '/dev/null'.IO.open(:w);
However, this has met with limited success. It works on runtime errors such as 1/0, but not compile times errors.
Desired outcome:
~> crag
> 1/0
Error: X::Numeric::DivideByZero «Attempt to divide 1 by zero when coercing Rational to Str»
>
I have tried the same idea inside the $cu.eval here but that does not work.
Actual outcome:
~> crag
> +$x
Use of uninitialized value $x of type Any in numeric context
in block <unit> at /Users/xx/.rakubrew/versions/moar-2025.08/share/perl6/site/resources/B4EA5A01DC96A0C8418F5A4882EDDFEB68838FE7 line 1
in block <unit> at /Users/xx/.rakubrew/versions/moar-2025.08/share/perl6/site/xx/B4EA5A01DC96A0C8418F5A4882EDDFEB68838FE7 line 1
in sub MAIN at /Users/xx/.rakubrew/versions/moar-2025.08/share/perl6/site/bin/crag.raku line 2
in block <unit> at /Users/xx/.rakubrew/versions/moar-2025.08/share/perl6/site/bin/crag.raku line 1
>
So, my request is for some kind of has $.stderr-to-devnull = False; attr on CodeUnit that I can override that dumps STDERR to dev/null please.
In raku App::Crag `ver<0.0.35>`, I have placed this line at the start of the MAIN to suppress all the stack trace info when an error occurs...
```
# Redirect STDERR to /dev/null
$*ERR = '/dev/null'.IO.open(:w);
```
However, this has met with limited success. It works on runtime errors such as 1/0, but not compile times errors.
Desired outcome:
```
~> crag
> 1/0
Error: X::Numeric::DivideByZero «Attempt to divide 1 by zero when coercing Rational to Str»
>
```
I have tried the same idea inside the $cu.eval [here](https://github.com/librasteve/raku-App-Crag/blob/73f895d99824145a73a16bc8bbeb77bcc23e4ab7/lib/App/Crag.rakumod#L64) but that does not work.
Actual outcome:
```
~> crag
> +$x
Use of uninitialized value $x of type Any in numeric context
in block <unit> at /Users/xx/.rakubrew/versions/moar-2025.08/share/perl6/site/resources/B4EA5A01DC96A0C8418F5A4882EDDFEB68838FE7 line 1
in block <unit> at /Users/xx/.rakubrew/versions/moar-2025.08/share/perl6/site/xx/B4EA5A01DC96A0C8418F5A4882EDDFEB68838FE7 line 1
in sub MAIN at /Users/xx/.rakubrew/versions/moar-2025.08/share/perl6/site/bin/crag.raku line 2
in block <unit> at /Users/xx/.rakubrew/versions/moar-2025.08/share/perl6/site/bin/crag.raku line 1
>
```
So, my request is for some kind of `has $.stderr-to-devnull = False;` attr on CodeUnit that I can override that dumps STDERR to dev/null please.