user-pic

Toby Inkster

  • Commented on Method Privacy in Perl
    That only partly solves the problem. It prevents subclasses from overriding the method when called from inside my class. It doesn't solve the wider problem of making it clear which methods are suitable for subclasses to call/override, and which methods...
  • Commented on Method Privacy in Perl
    There are perfectly valid reasons to have private methods. Say, for example, you have two different public methods that have a lot of code in common. Maybe a print_delivery_address_label() method and a print_billing_address_label() method. The common code could be factored...
  • Commented on Give your module a good SEE ALSO section
    I rarely write a DEPENDENCIES section, but I did for Type::Tiny, and it's more than just a duplication of the right-hand column on metacpan....
  • Posted Method Privacy in Perl to Toby Inkster

    This is a slightly expanded version of a comment I posted a couple of days ago on NEILB's blog.

  • Commented on Give your modules a good SYNOPSIS
    Add this to your pod, just before the SYNOPSIS code: =for test_synopsis use v5.14;...
  • Commented on Let's top git.io
    Yes, I've seen this list before. Although I'm nowhere near as active as kentfredric, I'm more active than a lot of the people on the list. For now, I'll follow kentfredric as my contribution to gaming this list, but it...
  • Commented on How to create an installable web application with config/data/bin stuff?
    Different Linux/Unix flavours keep their files in different places. I'd recommend installing stuff in the standard CPAN places, and rely on people packaging your application for specific distributions (Fedora, Debian, etc) to patch it to put everything in the right...
  • Posted Meta-Meta-Meta Problem Solving to Toby Inkster

    I happen to maintain the dependency, so better to fix it at source. Done. Let's set up Travis testing for this dependency too...

    Oh no, bui…

  • Posted Because Sometimes Lightspeed is Too Slow to Toby Inkster
    Spaceballs: Lightspeed is too slow. We'll have to go right to ludicrous speed.
  • Posted Planet Moose - June 2014 to Toby Inkster

    Welcome to Planet Moose, a brief write up on what's been happening in the world of Moose in the past month, for the…

  • Commented on Grants Committee 2014 first half
    You mean like this one?...
  • Commented on XS, Enough Said
    There might not be many great XS tutorials, but there's an #xs channel on the Perl IRC server, and I've found it a very helpful resource....
  • Commented on Enter MooseX, Appendix II Last One I Promiss!
    "However I do see that my compatibility Matrix isn't that broad covering only two OSs." Give it time. There are a few dedicated testers who submit results for Linux, Windows, and often FreeBSD within a few minutes of releasing your...
  • Commented on "Functional core & Imperative shell" : OO design, and isolated tests without mocks
    One class can happily pass a Point3D object to a second class. The second class can happily call the Point3D accessors and methods. However, the second class can't (easily) construct objects using the same Point3D definition from the first class....
  • Commented on "Functional core & Imperative shell" : OO design, and isolated tests without mocks
    MooX::Struct might be close to what you want for value objects....
  • Commented on mop problem 2 - Can't weaken attribute variable from outside
    Fiddling with an attribute from outside the class is a recipe for disaster anyway. Let's consider the Person class; all Person objects have a Head object associated with them because all (living) people have heads. The Person object probably has...
  • Commented on mop problem 4 - mop is misleading name
    "But truth is that any information is Class Information, not Object information." I don't think the "o" in "mop" is trying to suggest that it only keeps meta information about objects (and not about classes, roles, methods, attributes, etc). Instead...
  • Commented on Enter MooseX, V Well Thats a Wrap
    By the way, I disagree that these CPAN games do nothing to improve CPAN. I quite often answer questions on sites like PerlMonks and StackOverflow, and also on IRC and so forth. The answers to some of the more interesting...
  • Commented on Enter MooseX, V Well Thats a Wrap
    You know, I did explain how to fix those fails on older Perls....
  • Commented on Enter MooseX, The First, I made it
    PS: when you release version 0.001 of a distribution, I think the Kwalitee report should be more forgiving about a missing changelog. :-)...
  • Commented on Enter MooseX, The First, I made it
    "Type of arg 1 to keys must be hash" means that you're trying to do keys($requires) (where $requires is a hashref), but that only works in Perl 5.14 and above. Try keys(%$requires)....
  • Commented on Giving up on weekly neoCPANisms
    CPAN tortoise game: longest chain of releases of a particular distribution. A chain is disqualified if there were any two releases with release dates separated by less than 60 days. Slow and steady wins the race....
  • Commented on When a failure is not a failure
    Perl actually has about four different things it calls an expression internally. The thing which is valid after a named unary operator is an "arithexpr"; this is the most limited form of expression, only allowing operators with precedence down to...
  • Commented on When a failure is not a failure
    The (lack of) warning is nothing to do with exit(). Try this: $ perl -we'42;' Useless use of a constant (42) in void context at -e line 1. Now let's wrap that useless constant in a sub... $ perl -we'sub...
  • Commented on Looking for BTROTT
    BTROTT is Benjamin Trott. He is @btrott on Twitter....
  • Commented on Immutability with Moo(se)
    DBI is actually an example of where mutable objects are perfectly sensible: as iterators. Immutable objects are great because they are easier to reason about, reduce the possibilities for action at a distance, and make testing simpler. But they are...
  • Commented on Immutability with Moo(se)
    DBI::st objects are not conceptually immutable. If you call, say fetchrow_array on one, you get back a different row each time. This implies that each call is changing the internal state of the object....
  • Commented on Immutability with Moo(se)
    I don't think cloning is necessarily the best way to approach this. Yes, it's potentially a pretty thorough way to prevent people from tampering, but it has its own set of problems. If all objects are plain old blessed hashrefs,...
  • Commented on Immutability with Moo(se)
    If you make the assumption that all access to attributes is via accessor methods, and nobody is going to sneakily look at $instance->{"attr"}, then immutability is not that difficult to achieve. Firstly, make sure all attributes are declared as is...
  • Commented on A Less Smart Smartmatch
    It works with 5.8.1 and above. I would have liked to have supported 5.6.x too but I had trouble with it. (I think some of the overload-related stuff didn't work.)...
Subscribe to feed Recent Actions from Toby Inkster

  • Mike Friedman commented on Method Privacy in Perl

    I've been wondering recently if it would be possible to use the MRO API to be able to invoke lexical subs as methods. Then you wouldn't have to use the $ sigil in your method calls.

  • Liz commented on Method Privacy in Perl

    Perhaps a source of enlightenment:

    http://perlcabal.org/syn/S12.html#Submethods

  • Gabor Szabo commented on Give your module a good SEE ALSO section

    Wouldn't it be even better to have an entry in META.json listing the related modules?

  • Neil Bowers commented on Give your module a good SEE ALSO section

    Gabor: it would be a useful addition to have some information in the dist metadata. But where the SEE ALSO might link to various types of things, the metadata would have to be better structured.

    For example, we could have an x_similar_to, or something like this, which is for listing modules which provide at least some of the same functionality. This would enable a [more like this] function in MetaCPAN, for example.

    Then we could also have x_superseded_by, x_deprecated (discussed elsewhere as well, I know)

    Would be even better if it had some more ontological juice, but…

  • Sid Burn commented on Method Privacy in Perl

    Don't use inheritance. All problems solved.

Subscribe to feed Responses to Comments from Toby Inkster

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.