user-pic

Graham Knop

  • Commented on Moose, Mouse, Moo what next 'M'
    There's no reason OO is less appropriate for CGI or command line programs, especially if they share components with a larger system. The only real concern is if the overhead is worth it. And for Moo and Mouse, you won't...
  • Commented on Extracting values from a list of (key, value) pairs
    There is a small mistake in your code. @N has an odd number of elements. pairkeys will warn about this if warnings are on. Another option for this is doing an array slice: @N[ map $_*2, 0..(@N/2)-1 ] It's slower...
  • Commented on Perl 5.19.x performance improvements
    Why do you say that? Not that structured exceptions are a bad idea, but why are they any more important for signatures than any other part of the language?...
  • Commented on Perl 5.19.x performance improvements
    They are documented in perlsub in the new release: https://metacpan.org/pod/release/TONYC/perl-5.19.9/pod/perlsub.pod#Signatures...
  • Commented on Array and hash intersections with map, grep, and state
    This also won't work correctly if you run the code more than once. You'd be better off not using state, and just adding a my %Seen before the grep/map....
  • Commented on Introducing Kavorka
    While you are pointing to the other modules, to the casual observer it isn't obvious what the real advantages are to this module over the existing solutions....
  • Commented on CPAN modules for converting markdown to HTML
    While Moose certainly has a significant startup and memory cost, it should have little to no impact on normal runtime operations. For WWW::Curl::Simple from the HTTP benchmarks, the slowness is not inherent to Moose itself but in how it is...
  • Commented on Carp::Always::EvenObjects - Include stack traces with all errors/warnings
    I did propose it to the author of Carp::Always, but he didn't want to add it. He prefers keeping Carp::Always simple and small, a decision I can't fault him for. My module has more than 6 times as much code,...
  • Posted Carp::Always::EvenObjects - Include stack traces with all errors/warnings to Graham Knop

    Edit: Since writing this, I've decided on a proper name. Devel::Confess is the name for this module going forward. Carp::Always::EvenObjects exists now only as a wrapper around Devel::Confess.

    Carp::Always is a very useful mod…

  • Commented on The grep test - my personal experience
    Even when you "know the codebase", there will come times where you want to find all invocants of a function/method. Especially when refactoring. Like so many other things, keeping thing grep-able isn't a hard and fast rule. But dynamically generating...
  • Commented on Crowdsourcing self-confidence
    there are still parts of it to me that I can't seem to grok or get comfortable with As projects get larger and more stable, it becomes less important for one person to have a full understanding of all parts...
  • Commented on Names and Numbers, Brand and Identity
    What currently exists as Perl 5 needs an identity. A real identity that people can both understand and promote. "A member of the Perl family" is not an identity. Changing the name is not just about changing our comparison to...
  • Commented on Testing scripts in your distribution, portably
    Keep in mind that $FindBin::Bin can also contain spaces, so you should be quoting $MPATH as well. As I had mentioned in IRC, the full story with Windows argument quoting is a lot nastier, but at least for filenames, wrapping...
  • Posted Using system or exec safely on Windows to Graham Knop

    Passing a list of arguments to another program on Windows in perl is much more complicated than it should be. There are several different issues that combine that lead to this.

    (mostly copied from a post I made on PerlMonks)

    First is that argument lists are always passed as a sing…

  • Posted Converting Complex SVN Repositories to Git - Part 4 to Graham Knop
  • Posted Converting Complex SVN Repositories to Git - Part 3 to Graham Knop

    Resolving Branches and Calculating Merges

    The most important part of the repository conversion I did was resolving all of the branches and calculating the merge points. The majority of the rest of the process is easily automated with other tools.

    The main part of this section wa…

  • Posted Converting Complex SVN Repositories to Git - Part 2 to Graham Knop

    Initial Import into Git

    Creating a mirror

    SVN is slow, and git-svn is slower. The amount of network traffic needed by SVN makes everything slow, especially since git-svn needs to walk the history multiple times. Even if I made no mistakes and only had to run the import once, …

  • Posted Converting Complex SVN Repositories to Git - Part 1 to Graham Knop

    In May and June, I worked on converting the DBIx::Class repository from SVN to Git. I’ve had a number of people ask me to describe the process and show…

  • Commented on A history of Perl variables
    And CHILD_ERROR_NATURE should be CHILD_ERROR_NATIVE. I suppose I could have finished reading the post before replying....
  • Commented on A history of Perl variables
    s/WARNINGS_BITS/WARNING_BITS/...
  • Commented on Spot the error
    Or actually: rmap_all { $_ = $_ ? true : false if JSON::is_bool($_) } $arg; Probably should have checked the docs on Data::Rmap before replying....
  • Commented on Spot the error
    You are also relying on the internals of both boolean and JSON's boolean values, and breaking them in the process. JSON (PP or XS) uses singleton objects for the booleans, which means you are trying to rebless the constants $JSON::true...
  • Commented on So is wantarray() bad or not?
    I don't see a general problem with using wantarray to return different things as in your initial example, but using it for anything other than altering the return value seems very bad to me. For example, returning either an array...
  • Commented on More bash completion help for perldoc
    This is exactly feature I was going to ask for after seeing your previous post. Thanks....
Subscribe to feed Recent Actions from Graham Knop

Subscribe to feed Responses to Comments from Graham Knop

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 run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.