Acme-CPANModules-CPANModules

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


    Acme::CPANLists is an older, deprecated specification.

    Pod::From::Acme::CPANModules

  Snippets
    Acme::CPANModules::CPANModules contains this snippet to create entries
    by extracting "<pm:...>" in the description:

     $LIST->{entries} = [
         map { +{module=>$_} }
             ($LIST->{description} =~ /<pm:(.+?)>/g)
     ];

    This does not prevent duplicates. To do so:

     $LIST->{entries} = [
         map { +{module=>$_} }
             do { my %seen; grep { !$seen{$_}++ }
                  ($LIST->{description} =~ /<pm:(.+?)>/g)
              }
     ];

ACME::CPANMODULES ENTRIES
    Acme::CPANModules
        Author: PERLANCAR <https://metacpan.org/author/PERLANCAR>

    App::cpanmodules

lib/Acme/CPANModules/CPANModules.pm  view on Meta::CPAN


<pm:Pod::From::Acme::CPANModules>


## Snippets

Acme::CPANModules::CPANModules contains this snippet to create entries by
extracting `<pm:...>` in the description:

    $LIST->{entries} = [
        map { +{module=>$_} }
            ($LIST->{description} =~ /<pm:(.+?)>/g)
    ];

This does not prevent duplicates. To do so:

    $LIST->{entries} = [
        map { +{module=>$_} }
            do { my %seen; grep { !$seen{$_}++ }
                 ($LIST->{description} =~ /<pm:(.+?)>/g)
             }
    ];

_
    'x.app.cpanmodules.show_entries' => 0,
};

Acme::CPANModulesUtil::Misc::populate_entries_from_module_links_in_description;

lib/Acme/CPANModules/CPANModules.pm  view on Meta::CPAN

L<Acme::CPANLists> is an older, deprecated specification.

L<Pod::From::Acme::CPANModules>

=head2 Snippets

Acme::CPANModules::CPANModules contains this snippet to create entries by
extracting C<< E<lt>pm:...E<gt> >> in the description:

 $LIST->{entries} = [
     map { +{module=>$_} }
         ($LIST->{description} =~ /<pm:(.+?)>/g)
 ];

This does not prevent duplicates. To do so:

 $LIST->{entries} = [
     map { +{module=>$_} }
         do { my %seen; grep { !$seen{$_}++ }
              ($LIST->{description} =~ /<pm:(.+?)>/g)
          }
 ];

=head1 ACME::CPANMODULES ENTRIES

=over

=item L<Acme::CPANModules>

t/00-compile.t  view on Meta::CPAN

use IO::Handle;

open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";

my @warnings;
for my $lib (@module_files)
{
    # see L<perlfaq8/How can I capture STDERR from an external command?>
    my $stderr = IO::Handle->new;

    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
            $^X, @switches, '-e', "require q[$lib]"))
        if $ENV{PERL_COMPILE_TEST_DEBUG};

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$lib loaded ok");

    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/



( run in 1.128 second using v1.01-cache-2.11-cpan-49f99fa48dc )