Unable to refresh

Ralph Corderoy ralph at inputplus.co.uk
Sat Mar 24 04:54:34 PDT 2018


Hi Richard,

> > If they don't match anything then they normally remain and are
> > passed to get_iplayer anyway.
...
> > The argument with the glob is expanded into that and get_iplayer has
> > one argument, «R.steinway», that's used as a regexp.  It's unlikely
> > to match any titles, e.g. «Resteinway».
...
> I clearly still need to think it through further.

Or, study my worked example above until it's understood.  :-)

> I would have expected
>     get_iplayer * --since 110
> to match 67 programmes, but it matches 0.

«*» is probably being expanded by the shell based on entries in the
current directory.

> I would have expected
>     get_iplayer '*' --since 110
> to match 0 programmes but it matches 67.

get_iplayer, for some unknown reason, has

    my @search_args = map { $_ eq "*" ? ".*" : $_ } @ARGV;

to break its consistency over argument handling.  It treats these two
the same.  A bad idea IMO.

    get_iplayer '*'
    get_iplayer '.*'

> If I put in an invalid regex
>     get_iplayer *. --since 110
>     get_iplayer '*.' --since 110
> both seem to reach Perl as a regex even though the first has a bash
> wildcard.

Again, the worked example predicts this and covers it.  Create «a-dot-.»
in the current directory and try again.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy



More information about the get_iplayer mailing list