user-pic

Graham Knop

  • Commented on Looking for a new owner for my modules
    It's unlikely to need any updates, but I could take over Moo-Lax....
  • Commented on A (not so) simple matter of privacy
    I previously proposed allowing the syntax $object->&method_name to call a lexical sub (my sub method_name). This fits more with traditional perl OO, but it should be possible to extend to Cor methods. https://github.com/Perl/perl5/issues/18621...
  • Commented on My Favorite Modules: <code>if</code>
    Keep in mind that you can't avoid calling import on the module when it is loaded by if.pm. use POSIX (); # doesn't call import use if 1, 'POSIX', (); # does call import...
  • Commented on Can meta cpan display html table
    Yes, tables are allowed. You can see what HTML is allowed in the MetaCPAN code. MetaCPAN also provides a Pod renderer you can test with....
  • Commented on Speedup Travis by tweaking your Dist::Zilla config
    I despise working with any Dist::Zilla setup that modifies the working directory during a normal build. Doing automatic commits is even worse. If have files you want to regenerate easily, I think the [Regenerate] and [Regenerate::AfterRelease] plugins are much more...
  • Commented on Plan for perldoc 4.0
    Sites like MetaCPAN are probably the primary places to show images in pod documents, so MetaCPAN is probably the best place to discuss images in pod. I wrote the current implementation of the's image handling, and I'd be interested in...
  • Commented on So I Guess I'm Back
    Thanks for shipping fixes to your modules, especially Type::Tiny. I hope you've been doing well while you were away....
  • Commented on Paging TOBYINK
    I'd be interested in seeing your benchmark script to see what you are actually comparing, as some of the numbers seem a bit odd. Also note that MooX::TypeTiny exists and should make the combination of Moo and Type::Tiny as fast...
  • Commented on Reply to David Golden "Comparison of Class::Tiny and Object::Simple"
    David Golden is not the p5p pumpking....
  • Commented on Missing Smart Match
    I don't find $x in @a very comprehensible because it isn't obvious how it will be comparing elements. Will it use string equality or numeric equality? What if you need to pick one or the other?...
  • Commented on Missing Smart Match
    Trying to use looks_like_number to "fix" my example means that "01" ~~ "1" would return true. That is currently not the case. There are other similar cases that are more subtle. It just can't be done properly with perl's untyped...
  • Commented on Missing Smart Match
    Here's an example of a failure using the type of check you showed.my $scalar = "1welp"; my @array = (1, "foo"); print "smartmatch is broken\n" if ($scalar ~~ @array);I don't think anyone's happy that smart match couldn't be fixed properly,...
  • Commented on Travis-CI and latest version of Perl 5
    Adding a 'latest stable' target to travis-perl helpers isn't something that had occurred to me, but if you think it would be worthwhile, I could definitely do so. And I would certainly welcome any other feedback on it too....
  • Posted Moo 2.0 to Graham Knop

    The next stable release of Moo will be version 2.0, and will include some modules, and may help point out flaws in the existing code.

    The most important change in Moo 2.0 …

  • Commented on Kiss Kiss Shebang Shebang
    local::lib no longer loads File::Spec. The footnote mentions this, but is also incorrect. File::Spec isn't used on Windows or Mac OS X. It's only used on VMS and Mac OS Classic, where it seems unlikely the rest of local::lib will...
  • Posted Travis-CI Helpers for Perl to Graham Knop

    I deal with a lot of modules that promise backwards compatibility with older versions that old when developing, accidentally introducing incompatibilities is always a risk. Having a continuous integration system check…

  • Commented on perlbrew on OSX
    The problem is that you are installing modules into a local::lib, but that directory isn't part of the library search path. PERL_CPANM_OPT=--local-lib ~/perl5 means that things are always installed into ~/perl5, but the corresponding PERL5LIB isn't set up to load...
  • Commented on perlbrew on OSX
    The output of cpanm -v MP3::Info would be very helpful in tracking down the problem....
  • Commented on How to Run a Single Test via Dist::Zilla
    If you are dealing with XS code, you'll need prove's -b option instead of -l...
  • Commented on Conflict Resolution: local::lib and git's Perl
    I have a pending addition to local::lib that will install perl modules in a version specific directory. perl will then automatically pick those directories up, even they won't be listed directly in PERL5LIB. This will mostly fix problems of this...
  • 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 Devel::Confess - 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 Devel::Confess - 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...
Subscribe to feed Recent Actions from Graham Knop

  • Aristotle commented on A (not so) simple matter of privacy
    # which fields are visible from this eval?

    Isn’t the answer simply “none”? It seems a trick question. Fields aren’t visible inside a sub, whether it’s lexical or not, no?

  • Salvador Fandiño commented on A (not so) simple matter of privacy

    Isn’t the answer simply “none”?

    Yes, that was the conclusion: it is not a good idea to let lexical subroutines, declared at the class top level, access the object fields.

    It seems a trick question. Fields aren’t visible inside a sub, whether it’s lexical or not, no?

    Well, IMO, they should be visible if the sub is declared inside a method. For instance, I would expect the following code to work:

    use Scalar::Util qw(first);
    
    

    class A {
    field $…

  • Aristotle commented on A (not so) simple matter of privacy
    I would expect the following code to work:

    Well, yes, obviously, a closure is a different kind of situation. The question would be what happens in a named sub declared inside a method – where I would expect the exact same behaviour that the “variable will not stay shared” warning cautions against currently. And I would expect the use of a lexical sub to cure the problem, the same way it currently does for regular subs.

  • Toby Inkster commented on A (not so) simple matter of privacy
    method $do_internal () {
      ...;
    }
    

    has been supported by Zydeco for over a year. documentation.

  • Brett Estrade commented on Looking for a new owner for my modules

    How do I request to be come a member of https://github.com/PerlRedis? I like redis, though I don't use it as often as I probably should. I'd be happy to help tackle prioritized bugs as time permits. My GH is oodler577 and email is oodler@cpan.org.

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 with a graphic design donated by Six Apart, Ltd.