carp'd (which outputs to STDOUT, no?)
No, by default warn and Carp messages go to STDERR.
my code emits an error message
What error message exactly? That would help in grepping where in File::Fetch it's being generated.
the eval was added in as a suggestion to suppress the warning
eval only catches fatal errors, it does not stop things from being printed, including warnings.
First, I'd investigate where in the module the message is being generated and why the WARN flag isn't suppressing it. If the module doesn't provide a way to turn this message off, there may be some trickery necessary with a local $SIG{__WARN__} or other monkey patching. If the case were to be that I can't do anything about it, as a last resort one can use Capture::Tiny to catch any output from a block of code.
In reply to Re: $File::Fetch::WARN = 0; not working?
by haukex
in thread $File::Fetch::WARN = 0; not working?
by jamroll
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |