user-pic

Neil Bowers

Subscribe to feed Recent Actions from Neil Bowers

  • philip r brenan commented on Making Taint support optional in Perl

    Likewise we use taint in web applications whose code does not show up on CPAN. If taint were removed in later releases of Perl that would deny us an upgrade path to those releases. If you wish to remove taint please provide a feature guard so that the removal has to be explicitly requested. Thanks!

  • nhorne commented on Addressing CPAN vulnerabilities related to checksums

    I have a local mirror which downloads from https://cpan.org, so it's trusted. I then mount the mirror using NFS, so the entry in MyConfig.pm for urllist starts with "file://foo/bar". Even though I know it's trusted I still get:

    Warning: checksum file '/mnt/CPAN/authors/id/G/GB/GBARR/CHECKSUMS' not conforming.

    The cksum does not contain the key 'cpan_path' for 'CPAN-DistnameInfo-0.12.tar.gz'.
    Proceed nonetheless? [no]

    How can I handle this scenario?

  • 6031796 commented on CPAN Testers needs our help

    In the time since this article was posted the EPO has closed its doors so potential sponsors should no longer be directed there.

    Also, the sponsors page at http://iheart.cpantesters.org/ is showing an error and has been for many months, likely because it too depends on the now-gone EPO site. I've raised this problem elsewhere previously but perhaps you could also have a word?

  • J commented on The clearest way(s) to check if a List contains...

    I was just thinking on this the other day. To answer your Hash question: Like another commenter said hash lookup time is constant. It's can be a better choice when you want to search the array multiple times.

    When I was thinking about this I did some benchmarks. Hopefully I've done them right. I tested arrays of 100 elements searching for an integer that was in the middle of the array. I've pasted the results below.

    The way I interpret it is that you'd need to do at least 7 lookups for a hash lookup to be a better choice than grep, and around 25 lookups before it outperforms…

  • J commented on The clearest way(s) to check if a List contains...

    I forgot to mention that the reason why the lookup is slower on a single search in the first place is that I'm converting the array to a hash before doing the search. I'm using the "%hash = map { $_ => 1 } @array;" pattern you often see.

Subscribe to feed Responses to Comments from Neil Bowers

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.