Hi Andrew,

Am 25.07.2013 um 16:31 schrieb Andrew Cady <d...@jerkface.net>:
> This patch adds an option that allows the user to modify wget's output
> filenames using a perl expression.  It works similarly to perl's
> "rename" script, in terms of how perl is used to modify the filename
> string.  That is, the original filename is stored in the perl variable
> $_, which the user-supplied code can modify; the value left in $_ is
> used instead of the original.
> 
> Perl treats $_ as the default variable for regular expressions (among
> other operations), so the user can specify a regular expression without
> having to know any perl (other than perl-compatible regexes), and that
> will work fine.  But arbitrary perl code can be used, e.g., to perform
> character escapes.

I see a number of problems with this approach:
- It is not desirable to enable this on all platforms as there may be
  no perl in /usr/bin, so it should be possible to disable it during configure
- perl may be in another location

A solution with a generic program transformation similar to other GNU tools
(although during configure) like
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
would IMHO be more flexible and wouldn't require hardcoding any pathes.
Just to be clear: I would expect this solution directly to wget to transform
output file names and pathes.


Best regards

  -- Dago


-- 
"You don't become great by trying to be great, you become great by wanting to 
do something,
and then doing it so hard that you become great in the process." - xkcd #896


Reply via email to