Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: TagLib messages

by stevieb (Canon)
on Jun 24, 2015 at 17:12 UTC ( #1131845=note: print w/replies, xml ) Need Help??


in reply to TagLib messages

One way is to put the specific code that is generating the warning into a block that redirects STDOUT. You'll want to ensure you limit the scope, because if any other warnings are generated, you won't see them.

#!/usr/bin/perl use warnings; use strict; sub warning { print "ERROR!!!\n"; } my $out; open my $stdout, '>', \$out or die $!; { local *STDOUT = $stdout; warning(); }

-stevieb

Replies are listed 'Best First'.
Re^2: TagLib messages
by jfroebe (Parson) on Jun 24, 2015 at 19:21 UTC

    Perhaps a patch to the maintainer providing a method to categorize the warnings so you can silence the warnings of only the type you want?

    Jason L. Froebe

    Tech Blog

Re^2: TagLib messages
by Anonymous Monk on Jun 25, 2015 at 06:34 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1131845]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2021-05-13 10:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (134 votes). Check out past polls.

    Notices?