user-pic

blog.urth.org

  • Commented on Why I try to avoid Perl's punctuation variables
    We've been using subroutine signatures for a while at $WORK and it's a huge improvement. I really wish I could use them with my CPAN code too....
  • Commented on Test2/Test::Builder Update from the QAH
    Aristotle said: Thus the claim that Test modules would have to be written specifically against Test2, in order to be able to work with other Test2-based modules, is simply factually incorrect. That wasn't what I was trying to claim. Maybe...
  • Commented on Test2/Test::Builder Update from the QAH
    Leon Timmermans said: For the end-users, a split is clearly the less risky option, and there doesn't seem to be any direct advantage to them in keeping the ecosystems unified. I think the advantage for end users is that they...
  • Commented on Test2/Test::Builder Update from the QAH
    Several people have suggested making Test2 opt-in, but I don't see how that could possibly achieve anything of value. I work on two test modules that will greatly benefit from Test2. These are Test::Class::Moose (TCM) and TAP::Formatter::TeamCity (TeamCity). Neither of...
  • Commented on Private Moose Attributes
    has _request => ( is => 'ro', isa => 'Catalyst::Request', init_arg => 'request', predicate => '_has_request', );...
  • Commented on Automatic testing of your reverse dependencies with Test::BrewBuild
    I wrote a module, Test::DependentModules, that also tests reverse deps. It might be nice to use that instead of re-rolling this if your implementation is doing the same thing....
  • Commented on Help needed updating Gedcom::Date
    Oop, sorry, if you know the day you want 'yMMMD', I believe....
  • Commented on Help needed updating Gedcom::Date
    I think if you use DateTime->format_cldr() and get the format from $locale->format_for('y') and ->format_for('yM') that should do the trick....
  • Commented on A Date with CPAN, Part 1: State of the Union
    Also don't forget locale support, which is also quite useful for any app that has to support a wide variety of users....
  • Commented on A Date with CPAN, Part 1: State of the Union
    I can live without support for arbitrary timezones. I’m willing to be satisfied with two timezones: UTC, and whatever timezone I happen to be in. If you think about it, this is exactly what’s built into Perl itself: gmtime and...
  • Commented on Grants for applications (vs. Perl infrastructure)?
    I think the main requirement has to be that the software available under an open source license. I'd also be very skeptical of a grant that was aiming to bootstrap a business by building some sort of "open core" software....
  • Commented on Uploading a new package
    I'd suggest emailing modules@perl.org or Andreas Koenig, per http://pause.perl.org/pause/query?ACTION=pause_04about The Perl blogs site makes a poor bug reporting tool....
  • Commented on RFC: Limiting grant duration
    This sounds very reasonable. You might also consider limiting the proposed duration to something like 2 months per $1,000 dollars of grant money....
  • Commented on Djet
    What is this for? Why would we want to use it? What are the use cases?...
  • Commented on My CPAN Cleaning, Day 2457025.500000
    For the ubergit, maybe git got is what you're looking for? I haven't used it myself....
  • Commented on Spam on CPAN
    I filed a bug against the module's issue tracker. I don't think the author *intended* this to be spam, but it doesn't seem to serve much of a purpose....
  • Commented on Creating an MMORPG in Perl
    Yes, please keep blogging about this....
  • Commented on Classify your RT tickets on CPAN Day!
    This list could use a little curation. SVK has been long dead. Math-Pari is completely insane, though I guess some people still use it. Personally, I stay far aware and use the GMP bindings instead. As for Tk, I guess...
  • Commented on Are conference speakers compensated
    [Side note: Please link nouns like "compensation for conference speakers" rather than "wrote" ;)] Sawyer, this is all very interesting and worth reading, but I think you totally misunderstood what the "dirty secret" was in brian's post. It wasn't anything...
  • Commented on Are Abilities Roles?
    Doh, I missed that init_arg bit. Nonetheless, my point about whether you'd instantiate the base class stands. If the answer is no, there's no point in having it be a class at all....
  • Commented on Are Abilities Roles?
    What is the purpose of making Ability a class in this design? If you never plan to instantiate it, then it should be role. Also, with your current design I could write Strength->new( name => 'Wisdom' ). That makes no...
  • Commented on I hate Dist::Zilla and missing Makefile.PL
    Why do you need a Makefile.PL or Build.PL in a repo? If it's a pure Perl module you can do everything you need to simply by running prove. For my XS modules I always do add a minimal Makefile.PL or...
Subscribe to feed Recent Actions from blog.urth.org

  • Aristotle commented on Why I try to avoid Perl's punctuation variables

    More seriously, global variables bad, because action at a distance bad, and to the extent that Abigail’s version of the code is less readable than other formulations I find it’s mostly owing to the distance between setting the punctuation variable and the effect that that assignment has.

  • Aaron Crane commented on Why I try to avoid Perl's punctuation variables

    There's at least one valid use of $" that can't be replaced with join:

    my @regexes = list_of_qr_objects();
    my $combined = do { local $" = '|'; qr/@regexes/ };
    

    If any of the regex objects contain (?{ }) or (??{ }) constructs, using join would decompile and reparse the code. That in turn would require use re 'eval' in scope for the final qr, and even then it would break the use of any lexical variables that those code blocks might close over.

    However, qr/@regexes/

  • Joel Berger commented on Why I try to avoid Perl's punctuation variables

    This is one of the few examples where i know an even better trick, at least as long as you are using DBD::Pg

    my $query = <<"END_SQL";
        SELECT  foo, bar, baz
          FROM  SomeTable
        WHERE  id = ANY(?)
    END_SQL
    

    And then pass an array reference as the value. \o/

  • Merlyn Kline commented on Why I try to avoid Perl's punctuation variables

    I'm with Ovid. I love that perl will let me do very concise things and has all these features, but they should be used appropriately. Invoking perl with -e on the command line to do some one-off task is often only really possible this way, and knocking up a quick helper utility for something is much quicker and easier with these features.

    But Abigail's example wouldn't make it past review onto a production server. I'm on a multi-decade project and there's an inevitable turnover of staff so maintainability of code is critical; moreso even than having it work properly (maintainable but…

  • Steve Nolte commented on Why I try to avoid Perl's punctuation variables

    I applaud this article and others like it. At $work we are constantly fighting bugs in code that is "too clever" and not explicit. Also fascinating to see what may seem obvious to some (e.g. the Babycart operator) but quite confusing to newbies.

Subscribe to feed Responses to Comments from blog.urth.org

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.