A bug in get_iplayer-3.01?

RS richard22j at zoho.com
Wed Jun 7 02:58:19 PDT 2017


>From: Ralph Corderoy
>Sent: Monday, June 5, 2017 11:38

>> In another part of the code there is a variable sanitize_mode which
> >can have values between 0 and 4 to denote different treatment for
>> sanitising file and directory names, and I haven't worked out how that
>> gets set.

>$sanitize_mode is set at the start of substitute() from the second
>parameter to that function, with a default of 0 if that either doesn't
>exist, e.g. substitute('foo'), or is the value `undef'.

>I think the call where it's passed as 1 is

>   # Don't create subdir if we are only testing recordings
>   # Create a subdir for programme sorting option
>  elsif ( $opt->{subdir} ) {
>   my $subdir = $prog->substitute( $opt->{subdirformat} || '<longname>', 
> 1 );

Aside from my previous reply where I said I had missed the fact that the OP 
was concerned with –subdir, I think I did eventually get that.  The 
function/procedure/subroutine parameters I have difficulty with are ones of 
the form
my $string = shift;
I am inclined to agree with MrBrightside's comment in stackoverflow.
https://stackoverflow.com/questions/7082811/what-does-assigning-shift-to-a-variable-mean
"Forgive me but this seems like the worst convention ever for code 
readability."






More information about the get_iplayer mailing list