Your message to get_iplayer awaits moderator approval

C E Macfarlane c.e.macfarlane at macfh.co.uk
Sun Nov 9 10:06:00 PST 2014


>     The tests are scattered for a reason.  No need to check
>     binaries if they
>     aren't going to be used.

So instead you are not sure whether you've initialised the binary variables
and/or tested for the binary existences, and do the work twice or more.  For
example:

1) In line 1362-3, you have the following:
	# this probably needs to be initialised earlier - needed for tagging
	$bin->{atomicparsley} = $opt->{atomicparsley} || 'AtomicParsley';
... but line 1363 is just a repeat of line 888 ...
	$bin->{atomicparsley} = $opt->{atomicparsley} || 'AtomicParsley';

2) Similarly, lines 892, 7128, 7723, 8235, 8491, 8642 all test for the
existence of rtmpdump

>     > at least searches for all the external binaries up front  -
>      I think for the
>     > future it would be a good idea to test for the versions
>     there as well  -
>     > and sets the bin->{name} variable either to the path to
>     each, or to a null
>
>     That way lies madness ... get_iplayer doesn't do anything
>     specialised with the external applications.

Line 9004 tests for the version of rtmpdump

I may not be an experienced PERL programmer, but I do have a long history of
programming in a number of other languages, and I know that on grounds of
code maintenance, etc, it would be better to move all such tests to the
external binary section beginning at line 848.  However, as you are
obviously determined not to agree, I'm not going to waste any more effort in
persuading you.




More information about the get_iplayer mailing list