[PATCH] Fix warning with older versions of Perl

Bastien Nocera hadess at hadess.net
Tue Apr 15 02:09:56 PDT 2014


Apologies for the long turn-around time.

On Tue, 2013-10-01 at 12:38 +0100, dinkypumpkin wrote:
> On 01/10/2013 06:34, Bastien Nocera wrote:
> > INT=
> Thanks.  That all looks as it should, and I would have been surprised if 
> it were otherwise.  But, I've no idea why get_iplayer finds that 
> $SIG{INT} has already been set to "IGNORE".  get_iplayer doesn't do so 
> itself.  What are you doing in get_iplayer when the error appears?

Usually just running it in pvr mode.

> I also don't understand your patch:
> > -	$SIGORIG{$signal}->() if $SIGORIG{$signal};
> > +	$SIGORIG{\@$signal}->() if $SIGORIG{\@$signal};
> Making $signal an array reference and using it as in index into %SIGORIG 
> just means that the if test will always fail.  That probably doesn't 
> make any difference in this context, but it doesn't seem like the right 
> answer to me.


>   Try this instead and let me know if it works for you:
> $SIGORIG{$signal}->() if ref($SIGORIG{$signal}) eq 'CODE';

I've used that piece of code for a few months and I don't see any
warnings any more.


More information about the get_iplayer mailing list