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

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

Thread Previous | Thread Next
From:
Casey West
Date:
April 23, 2003 10:21
Subject:
Re: [PATCH] [perl #18055] Clarify for bug resolution.
Message ID:
20030423172542.GT15574@geeknest.com
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About