On Sun, 10 Nov 2002 12:17:55 -0600, [EMAIL PROTECTED] (_brian_d_foy)
wrote:

> +If you want a list of all of the Perl module filenames, you
> +can use File::Find::Rule.
> +
> +       use File::Find::Rule;
> +
> +       my @files = File::Find::Rule->file()->name( '*.pm' )->in( @INC );

Why not give a recipe with File::Find? Maybe the syntax is not as
pleasing to some, but it's part of the core distribution so you don't
have to fetch a module from CPAN. Something like this should work:

    use File::Find;
    my @files;

    find sub { push @files, $File::Find::name if -f _ && /\.pm$/ },
         @INC;

Cheers,
Philip

Reply via email to