Title: RE: ExtUtils::MakeMaker PL_FILTER option

> FILTER_MAP => {
>   qr/.pm$/                     => 'grep ...',  # like PM_FILTER
>   qr/.pl$/                     => 'grep ...',  # like PL_FILTER
>   qr/.cgi|my_binary/ => 'grep ...',  # ...very flexible
> },
>
> In Data::FormValidator, there's also code to support this
> kind of syntax for older Perl's without "qr". It uses an RE to match
> an RE. It looks more hackish than just supporting 'qr', but it works
> reliably in that application.

Sounds cool. Manipulating regexes with regexes is always fun. Anyway, when I put my pedantic hat on shouldnt that be:

FILTER_MAP => {
  qr/\.pm$/i                      => 'grep ...',  # like PM_FILTER
  qr/\.pl$/i                      => 'grep ...',  # like PL_FILTER
  qr/\.cgi$|my_binary/i   => 'grep ...',  # ...very flexible
}

But i like the general idea quite a bit.

:-)

Yves
ps: the /i demonstrates one weakness of this approach. How to Do The Right Thing on case insensitive OS's


Reply via email to