Toby Inkster

  • Website:
  • About: I'm tobyink on CPAN, IRC and PerlMonks.
  • Posted Matching simply to Toby Inkster

    A little over ten years ago, when Perl 5.18 was approaching its release date, I released match::simple. This was mostly in response to the smartmatch operator (~~) being deprecated, but…

  • Posted Increasing Perl’s Visibility, Redux to Toby Inkster

    Perl has had the CPAN and awesome websites like MetaCPAN …

  • Posted Experiments in Overloading to Toby Inkster

    A simple class:

      package Local::Overloaded {
  • Posted Introducing Exporter::Almighty to Toby Inkster

    Consider a simple module like this:

  • Posted Using Type::Params Effectively to Toby Inkster

    One of the modules bundled with Type::Tiny is Type::Params, a module that allows you to validate subroutine signatures using type constraints. It's…

  • Posted Perl Testing in 2023 to Toby Inkster

    With my open source work, I've historically taken an approach which relies more on integration testing than unit testing, but with some of my newer projects, I've tried adopting principles from $paidwork and applying them to my free software.

  • Posted Creating a Simple DSL in Perl to Toby Inkster
  • Posted Keeping Your Valuables Under Lock and Key to Toby Inkster

    Consider the following fairly simple class, which creates a lookup object for month names:

  • Posted SemVer but with Extra Steps to Toby Inkster

    This is a variant of SemVer which mostly meets all its rules, except for releases prior to 0.2.0, where we bend them slightly.

    It is my intention to use this versioning system for all open source software I develop from 1 January 2023 onwards. Existing ope…

  • Posted Type::Tiny v2 is Coming to Toby Inkster

    Eagle-eyed watchers of CPAN may have noticed that I've recently been releasing Type::Tiny development releases with version numbers 1.999_XYZ.

  • Commented on RFC: new API for Type::Params
    That is perhaps the best option....
  • Commented on RFC: new API for Type::Params
    True. Or: use Type::Params -modern; My reason for suggesting a different module name is to also be able to simplify documentation for the end users, so the pod for the old stuff they don't need to worry about is away...
  • Posted RFC: new API for Type::Params to Toby Inkster

    Firstly, I'm not planning on breaking compatibility with Type::Params. The new API would live under a different namespace, such as Type::Params2.

    The API for Type::Params is currently:

    use feature 'state'…
  • Commented on Match Anything, Quickly
    Type::Tiny's grep method should be pretty fast to filter a list of strings in most cases. use Types::Standard -types; use Types::Common::String -types; # null filter: @filtered = Any->grep( @strings ); # filters which do things: @filtered = NonEmptyStr->grep( @strings );...
  • Commented on Mite: an OO compiler for Perl
    There's a ticket on the issue tracker for a Dist::Zilla plugin. I'm unlikely to implement it myself, but would certainly accept one....
  • Commented on Smart Match in CPAN
    If porting code to not use ~~, then match::smart provides a very similar matching function....
  • Posted Mite: an OO compiler for Perl to Toby Inkster
  • Commented on A (not so) simple matter of privacy
    method $do_internal () { ...; } has been supported by Zydeco for over a year. documentation....
  • Commented on Addressing CPAN vulnerabilities related to checksums
    A while back, I started providing PGP/GPG signatures for all my CPAN and BackPAN releases here. Obviously, this doesn't help with people using the CPAN client to automatically download and install packages, but might be useful if anybody wants to...
  • Commented on Monthly Report - June
    CodersRank can be crazy. My score goes up and down quite dramatically for seemingly no reason. You're often ahead of me....
  • Commented on I failed to pause before blogging
    I think the indexer probably goes through line by line to avoid slurping in the whole file....
  • Commented on I found the truth about GameStop, Qanon, the Biden adminstration, and the British Royal Family
    Aliens from Mars killed Lee Harvey Oswald to hide the truth that eating Kraft instant mac and cheese boxes causes obesity. Lee Harvey Oswald found out because they were the source of all knowledge. Aliens from the moon know the...
  • Commented on Mood Lighting
    The way I currently have it, one cycle takes about 20 minutes; it's very subtle and slow, so a video would not be especially interesting. I'll try filming a faster sequence with more contrast between the colours though....
  • Posted Mood Lighting to Toby Inkster

    The lighting in my bedroom uses Philips Hue bulbs — specifically, the coloured ones. Last night, I decided it would be nice to set the three lights in my bedroom to cycle slowly through a set of warm colours using a script.

    I didn't…

  • Commented on Perl weekly challenge 95
    Your initial function can be simplified further. sub is_palindrome_rev { $_[0] eq reverse $_[0] } Any time you have something like: if ( X ) { return true; } else { return false; } That should trigger your code smell...
  • Commented on A Static Archive of
    Also click on the "URI-duri" link from
  • Commented on A Static Archive of
    Some issues seem missing. If you look at then try clicking on the links. The first one is broken, but the others work....
  • Commented on Drawing a blank with XS
    Python: Let's make whitespace characters syntactically signicifant. Perl: Hold my beer and watch this!...
  • Commented on Perl dying? Well now I don't care
    (If it was unclear in my previous comment, the "Yes" was supposed to be alt text for the image, to be displayed if the image cannot be shown.)...
  • Commented on Perl dying? Well now I don't care
    I can understand the push back on YAML. YAML is a huge specification, way more complex than you need. There's already a cut-back broken implementation in core, adding a second cut-back broken implementation seems a bad idea, and adding a...
Subscribe to feed Recent Actions from Toby Inkster

  • Deven commented on Match Anything, Quickly

    Easy mistake to make! I never noticed it until I added extra code to print the results of the matches and discovered that the subs never matched!

    Your basic point still stands though -- without using /o when calling a qr// regex, it is several times slower than using the anonymous subroutine...

  • Aristotle commented on RFC: new API for Type::Params

    Wouldn’t it be close enough to update the documentation to prominently describe only the new style, and for the old interface just put some stubs near the end of the POD that merely say stuff like (e.g.) this?

    compile_named_oo(...): does the same thing as signature(named=>[...])

  • Matthew Persico commented on RFC: new API for Type::Params

    --modern. I could live with that.

  • Matthew Persico commented on RFC: new API for Type::Params

    I agree. At the top you can put a blurb like:

    Note: This module was given a "facelift" in 2022 with a more natural API. These docs have been revamped to feature the new API prominently, but the old API's functions are still documented within, mapped to the new calls.

  • Aristotle commented on RFC: new API for Type::Params

    I really dislike marketing/judgy terms like “modern” for this kind of thing. “Modern” conveys nothing about the interface, it’s just what someone thinks of it – or rather, thought of it at the time the term was assigned. Next time the API gets a facelift, what then? Postmodern? Hypermodern? What do you put in the documentation, “-modern is actually deprecated now”? Or do you – and perish the thought – break backcompat?

    It’s rather better to use descriptive terms that highlight some defining characteristic of the interface. In this particular case,…

Subscribe to feed Responses to Comments from Toby Inkster

About is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.