develooper Front page | perl.perl5.porters | Postings from April 2003

Re: [PATCH] [perl #18055] Clarify for bug resolution.

Thread Previous | Thread Next
Casey West
April 23, 2003 10:21
Re: [PATCH] [perl #18055] Clarify for bug resolution.
Message ID:
It was Wednesday, April 23, 2003 when Robin Barker took the soap box, saying:
: Casey
: As an alternative, replace the find command with perl:
:     % perl -MFile::Find=find -Tlwe \
: 	'find { wanted => sub { print if /\.pm\z/ }, no_chdir => 1 },
: @INC'

One of the biggest complaints people have had with that is the output
is so unix centric.  However, thanks to Ken Williams (who reminded me
of File::Spec) and Jonathan Steinert (for win32 testing) I've got an
almost portable shell solution.

    % perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \
      'find { wanted => sub { print canonpath $_ if /\.pm\z/ },
      no_chdir => 1 }, @INC'

With the caveat that under win32 the quotes need to be doubled.

I'd be happy with this solution.

  Casey West

If you put garbage in a computer nothing comes out but garbage. But
this garbage, having passed through a very expensive machine, is
somehow ennobled and none dare criticize it. 

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About