Toby Inkster
  • Hire
  • Open Source
  • Blog
  • Book Reviews
  • Now
  • Contact
Home » Blog » tricks

tricks

Type::Tiny Tricks #7: Tricks with Dicts

23/08/2014

By Toby Inkster

Share this article

In Perl, hashes are typically used for two sorts of purposes: maps (where the hash key acts as an object identifier) and dictionaries (where the hash key acts like a field name). A quick illustration of what I mean…

Type::Tiny Tricks #6: Tricks with Tuples

22/08/2014

By Toby Inkster

Share this article

Let's say you want an attribute to accept a pair of numbers – perhaps a geographic co-ordinates [ 50.873, -0.002 ]. You could constrain the attribute as ArrayRef[Num], but that would accept an arrayref containing a single number, or…

Type::Tiny Tricks #5: Wrapping Moose/Mouse Type Constraints

21/08/2014

By Toby Inkster

Share this article

So you have this Moo class, and it turns out what you really need for it is the StrictVersionStr type constraint defined in MooseX::Types::Perl. You could switch the class to Moose, but long term you want to stick with…

Type::Tiny Tricks #4: Inlined Type Constraints

20/08/2014

By Toby Inkster

Share this article

Type::Tiny Tricks #3: One-off Coercions

19/08/2014

By Toby Inkster

Share this article

Type::Tiny Tricks #2: Types Are Objects

18/08/2014

By Toby Inkster

Share this article

Type::Tiny Tricks #1: Quick Intersections

17/08/2014

By Toby Inkster

Share this article

Recent Blog Posts

  • Type::Tiny 2.8.0 Released
  • One Day Blinding Stew
  • How to Cook Macaroni & Cheese from Scratch
  • Matching simply
  • Increasing Perl’s Visibility, Redux

Blog Archives

  • ▼2025 (1)
    • March (1)
  • ►2024 (1)
    • February (1)
  • ►2023 (12)
    • August (1)
    • July (1)
    • April (2)
    • March (2)
    • February (3)
    • January (3)
  • ►2022 (4)
    • December (1)
    • September (1)
    • August (1)
    • July (1)
  • ►2021 (7)
    • July (1)
    • May (4)
    • January (2)
  • ►2020 (22)
    • November (3)
    • October (2)
    • September (3)
    • August (2)
    • June (3)
    • May (5)
    • February (3)
    • January (1)
  • ►2019 (5)
    • December (1)
    • November (1)
    • October (1)
    • January (2)
  • ►2018 (6)
    • August (4)
    • July (1)
    • June (1)
  • ►2017 (4)
    • June (2)
    • May (1)
    • February (1)
  • ▼2014 (50)
    • December (1)
    • November (1)
    • October (3)
    • September (4)
    • August (11)
    • July (5)
    • June (2)
    • May (4)
    • April (2)
    • March (7)
    • February (6)
    • January (4)
  • ►2013 (30)
    • December (4)
    • November (4)
    • October (6)
    • September (1)
    • August (1)
    • July (2)
    • May (1)
    • April (2)
    • March (3)
    • February (3)
    • January (3)
  • ►2012 (28)
    • December (2)
    • October (1)
    • September (3)
    • August (2)
    • July (6)
    • June (1)
    • May (8)
    • April (5)
  • ►2009 (1)
    • January (1)
  • ►2008 (46)
    • December (3)
    • November (1)
    • October (1)
    • August (2)
    • July (2)
    • May (1)
    • April (3)
    • March (9)
    • February (5)
    • January (19)
  • ►2007 (69)
    • November (10)
    • August (8)
    • July (6)
    • June (9)
    • May (8)
    • April (16)
    • March (2)
    • February (9)
    • January (1)
  • ►2006 (2)
    • December (1)
    • March (1)
  • ►2005 (7)
    • November (1)
    • September (1)
    • August (1)
    • June (1)
    • February (3)
  • ►2004 (1)
    • November (1)
  • ►2003 (20)
    • October (1)
    • September (3)
    • August (16)
  • ►2002 (3)
    • August (1)
    • July (1)
    • March (1)

Recent Book Reviews

  • Girl, 11 by Amy Suiter Clarke
  • Murder on a School Night by Kate Weston
  • How to Find a Missing Girl by Victoria Wlosok
  • Everyone In My Family Has Killed Someone by Benjamin Stevenson
  • Kill Joy by Holly Jackson

Thoughts

  • 05/07/2024 20:03
    This is the winningest #Bingo card I've seen today:https://tacticalvoter.uk/bingo/3178#election #ukelection #ukelections #ukelection2024 #toriesout
  • 05/07/2024 06:43
    #KeirStarmer: "We can look forward again, walk into the morning. The sunlight of hope, pale at first, but getting stronger through the day, shining once again on a country with the opportunity, after 14 years, to get its future back."This speech reminds me of something...https://www.youtube.com/watch?v=HqjhHVUzl8o#election #ukelection #ukelections #ukelection2024 #toriesout
  • 05/07/2024 06:15
    I like how the #GreenParty said right at the start that they were going to concentrate on Brighton Pavilion, Bristol Central, Waveney Valley and North Herefordshire.And the polls predicted that they'd win maybe one or two seats.And the party said, no, our own polls are more accurate. We'll win them.And the media predicted that they'd […]
  • 05/07/2024 05:47
    @BBC Actually, fourth.#election #ukelection #ukelections #ukelection2024 #toriesout #greenparty
  • 05/07/2024 05:43
    Accord to Sky News, Liz Truss is "looking well dodge".#election #ukelection #ukelections #ukelection2024 #toriesout

Tags

acmeoop america bbc bbc-news blogging Book british CBeebies cheese Class-Tiny CPAN demiblog future html HTML italy javascript linux mexico Moo Moops Moose moose MooX-Press Mouse OOP p5-mop pasta perl php politics programming recipes roles science security spicy Testing tomato tricks Type-Tiny Uncategorized usability web wordpress

Copyright © 1999–2025 Toby Inkster. All rights reserved.
Terms of Service · Privacy Policy · No AI/ML Clause

Cleantalk Pixel

Quick Links

  • Profile
  • Blog
  • Mastodon
  • GitHub
  • Contact