Acme-CPANModules-Import-CPANRatings-User-perlancar

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

        crippled/limited in some way. Plus, the modules are mostly
        incompatible with one another. And that's why TIMTOWTDI. <br><br>For
        the task of just listing files in an archive, for example, it seems
        only Archive::Tar and Archive::Tar::Wrapper are usable. Archive::Tar
        is a core module, but relatively slow, and extracts all contents of
        an archive in memory so it's not workable for huge archives. <br>

    Hash::Util::Pick
        Author: PINE <https://metacpan.org/author/PINE>

        One can easily use this idiom instead: <br><br>$picked = { map
        {(exists $hash{$*} ? ($*=&gt;$hash{$*}):())} @keys }; <br><br>or:
        <br><br>$picked = { map {$*=&gt;$hash{$*}} grep {exists $hash{$*}}
        @keys }; <br><br>or (if you want non-existing picked keys to be
        created instead): <br><br>$picked = { map {$_ =&gt; $hash{$_}} @keys
        }; <br><br>but Hash::Util::Pick is implemented in XS and can be a
        few times faster than the above when the number of keys has reached
        thousands. So I guess this module has its uses.

    NetObj::IPv4Address
        Author: HEEB <https://metacpan.org/author/HEEB>

        Cons: more heavyweight (requires Moo), limited operations/methods,
        can only handle IPv4 and not IPv6. Pros: some operations are faster
        than competing modules, e.g. validation. See also: NetAddr::IP,

devdata/perlancar  view on Meta::CPAN


   (<a href="https://metacpan.org/release/Hash-Util-Pick/">0.03</a>)



</h3>



<blockquote class="review_text">
One can easily use this idiom instead:
<br><br>$picked = { map {(exists $hash{$_} ? ($_=&gt;$hash{$_}):())} @keys };
<br><br>or:
<br><br>$picked = { map {$_=&gt;$hash{$_}} grep {exists $hash{$_}} @keys };
<br><br>or (if you want non-existing picked k...
</blockquote>


<div class="review_footer">
<p class="review_attribution">
<a href="/user/perlancar">perlancar</a> - 2016-08-28T21:18:03
(<a href="/dist/Hash-Util-Pick#12854">permalink</a>)
</p>

<div class="helpfulq">

lib/Acme/CPANModules/Import/CPANRatings/User/perlancar.pm  view on Meta::CPAN

package Acme::CPANModules::Import::CPANRatings::User::perlancar;

use strict;

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-29'; # DATE
our $DIST = 'Acme-CPANModules-Import-CPANRatings-User-perlancar'; # DIST
our $VERSION = '0.002'; # VERSION

our $LIST = {description=>"This list is generated by scraping CPANRatings (cpanratings.perl.org) user page.",entries=>[{description=>"\nI'm not sure this really &quot;befits a ::Tiny distribution&quot; just because it's a thin wrapper of something. P...

1;
# ABSTRACT: List of modules mentioned by CPANRatings user perlancar

__END__

=pod

=encoding UTF-8

lib/Acme/CPANModules/Import/CPANRatings/User/perlancar.pm  view on Meta::CPAN

Sadly there is not a single perfect Archive::Tar::* module out there. Either a module offers incomplete API, (was) buggy, or it is crippled/limited in some way. Plus, the modules are mostly incompatible with one another. And that's why TIMTOWTDI.
<br><br>For the task of just listing files in an archive, for example, it seems only Archive::Tar and Archive::Tar::Wrapper are usable. Archive::Tar is a core module, but relatively slow, and extracts all contents of an archive in memory so it's not ...
<br>


=item L<Hash::Util::Pick>

Author: L<PINE|https://metacpan.org/author/PINE>

One can easily use this idiom instead:
<br><br>$picked = { map {(exists $hash{$I<} ? ($>=&gt;$hash{$I<< }):())} @keys };
<br><br>or:
<br><br>$picked = { map {$ >>=&gt;$hash{$I<}} grep {exists $hash{$>}} @keys };
<br><br>or (if you want non-existing picked keys to be created instead):
<br><br>$picked = { map {$_ =&gt; $hash{$_}} @keys };
<br><br>but Hash::Util::Pick is implemented in XS and can be a few times faster than the above when the number of keys has reached thousands. So I guess this module has its uses.


=item L<NetObj::IPv4Address>

Author: L<HEEB|https://metacpan.org/author/HEEB>

Cons: more heavyweight (requires Moo), limited operations/methods, can only handle IPv4 and not IPv6. Pros: some operations are faster than competing modules, e.g. validation. See also: NetAddr::IP, Net::CIDR.
<br>

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 0.362 second using v1.01-cache-2.11-cpan-49f99fa48dc )