user-pic

Andrew Rodland

  • About: Instant karma's gonna get you.
  • Commented on Are Restricted/Locked Hashes A Failed Experiment?
    They interest me very little, but I'm not sure how much of a failure they are. fields.pm does actually support some degree of compile-time checking if you do "my Type $var", but of course no one actually does. What I...
  • Commented on I start creating static perl
    2008 was a long time ago....
  • Commented on What should Rakudo-js aim for first?
    Node is the one *not* to go for IMO — Perl 6 isn't in need of another server-side runtime at the moment, and getting Perl 6's and Node's concurrency models to play together would be... interesting, actually, but also complicated...
  • Commented on How does <email>@cpan.org work?
    I don't know of any mail that I'm not getting, but maybe I don't know because I'm not getting it....
  • Commented on Meta-Meta-Meta Problem Solving
    The other day I saw t0m wearing this shirt. Sounds like you deserve one too....
  • Commented on Spelunking: why 'while(){ }' is my new favorite perl-ism
    (And the commits from ??? until 2008 are real enough, but they were originally done in Perforce, of all things, and imported into git in 2008, when the git became the master repo.)...
  • Commented on Spelunking: why 'while(){ }' is my new favorite perl-ism
    The commits from before Perl 5 or so aren't real git commits of course; they're perl releases gathered from Usenet and maybe other places and imported into git after the fact, and the commit messages are the associated release announcements....
  • Commented on Perl 5.19.x performance improvements
    "return" is a control flow operation, it has to arrange to *leave* the sub from wherever it is. That's additional work compared to just leaving a value on the stack....
  • Commented on Web Services Part 2: Using Joyent
    Debian has 5.14 in stable, actually....
  • Commented on The syntax of English is undecidable
    Meaning informs parsing. Meaning, and prior experience, clearly have a big impact on how our brains interpret a series of words. But it's not absolutely necessary. We can see unfamiliar words, intuit a part of speech for them, and move...
  • Commented on YAPC::NA is 75% sold out!
    I hope you're counting confirmed speakers in your attendance total, if you've got a hard limit....
  • Commented on I was called "fucking asshole"
    You are unfit to live on a planet with human beings. Please stop....
  • Posted More Marpa Madness to Andrew Rodland

    For the past year or so, I've been following the posts on Marpa with interest, but I never got around to writing anything with it, because honestly, the docs seemed a little bit opaque and incomplete to me.

    Then, the other day, I…

  • Commented on Never ever trust Ubuntu
    It's possible for a newer but more popular package to "win" after a couple of deprecation cycles. Since 2009, installing "git" will get you the git VCS, and installing "gnuit" will get you what used to be in the "git"...
  • Commented on I need pack examples for the Camel
    I don't have a good example using @ or any of the things you asked for, but I do have an example that's interesting in its own way. Years ago, in Freenode #perl, I was working with someone who was...
  • Commented on Syntax police?
    Then again, that ambiguity is *good* ambiguity if you like the idea of aliased.pm :)...
  • Commented on short CPANTS update
    The one thing that confuses me endlessly -- why does the CPANTS grapher think that the year 2010 is both before and after the year 2008? http://cpants.perl.org/static/graphs/ARODLAND_dists.png...
  • Commented on Why the Lacuna Expanse is good for Perl
    Now (not to belittle TLE at all), all we need is more. Because it's always embarrassing to have one awesome thing that everyone points out whenever a topic comes up. :)...
  • Commented on What are the best Perl one-liners you've written?
    Not technically a oneliner because it's not standalone code, but one that I like anyway: cartesian product in one tweet. With the air let back into it, it's: use List::Util qw(reduce); sub list_product { reduce { [ map { my...
Subscribe to feed Recent Actions from Andrew Rodland

  • Jon Jensen commented on Are Restricted/Locked Hashes A Failed Experiment?

    I've used restricted hashes in a few ecommerce situations where they were indispensable, exactly as important and useful as `use strict` for making sure lexical accesses aren't typos.

    I don't have any opinion about whether restricted hashes should be part of all hash types -- I think I'd be fine using a special hashlike object since I haven't used them a lot. But in the cases I've needed them, they were really, really helpful.

  • Andreas Koenig commented on Are Restricted/Locked Hashes A Failed Experiment?

    kid51: short example

    % perl -le '
    use Getopt::Long;
    use Hash::Util qw(lock_keys);
    lock_keys %Opt, qw(mrg);
    GetOptions(\%Opt, "mrg=i") or die;
    if ($Opt{mgr}){
    print "INT=$Opt{mrg}";
    }
    '
    Attempt to access disallowed key 'mgr' in a restricted hash at -e line 6.

    An example that combines with Pod::Usage:
    http://repo.or.cz/cpan-testers-parsereport.git/blob/HEAD:/bin/ctgetreports

  • Mikko Koivunalho commented on Are Restricted/Locked Hashes A Failed Experiment?

    For me lock_keys is a typo checker, also but not limited for production code, also but not limited for blessed hashed.

  • Toby Inkster commented on Are Restricted/Locked Hashes A Failed Experiment?

    Locked hashes are great, but if the implementation is slowing down all hashes, then I agree they should no longer be built in, and should be moved to a module

    That said, I think it's an important enough feature that this module should be bundled with Perl, so that people relying on fields.pm (which was first released with Perl 5.5) and Hash::Util (Perl 5.8) won't need to install anything extra.

  • Alceu Rodrigues de Freitas Junior commented on Are Restricted/Locked Hashes A Failed Experiment?

    I have used Hash::Utils more than once, specially in OOP projects that I was using "default" OOP model of Perl (not Moose or anything like that).
    On the other hand, I usually don't start using it from scratch, usually when things starts to getting more complex and bugs starts to appear it is a sign that I should consider using it.
    It is good to be have options... sometimes you need flexibility (like expanding a…

Subscribe to feed Responses to Comments from Andrew Rodland

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.