Perl šŖ Weekly #760 - Async Perl
Source: Dev.to
Hello, Perl Community!
Perlās asynchronous ecosystem continues to grow, enabling developers to build nonāblocking, responsive applications with ease. Modules like IO::Async, async features in Mojolicious, and helpers for asynchronous database operations (such as DBIx::Class::Async) allow eventādriven designs, background tasks, and futures/promises, making highāthroughput web services, realātime APIs, and streaming pipelines straightforward to implement.
Projects like PAGI and PAGI::Server, now with HTTP/2 support, and Thunderhorse showcase how Perl can handle multiple connections efficiently while keeping code clear and maintainable. Together, these tools make it easier to build responsive, scalable, and maintainable applications, all while retaining the expressive, pragmatic style that continues to define Perl.
With each new module and project, Perlās potential in the modern, concurrent world keeps expandingāthe best is yet to come.
Milestone: This issue marks my 200th edition. Enjoy the rest of the newsletter and stay safe.
š Upcoming Event
Join us for TPRCāÆ2026 in Greenville, SC!
Itās great to see the announcement for The Perl and Raku Conference 2026 (TPRC) taking shape, with registration open and plans underway for a vibrant community gathering in Greenville, SC this June. The conference reinforces the value of bringing Perl and Raku developers together for talks, workshops, and networkingāa highlight on the openāsource calendar that strengthens the ecosystem and connects contributors across projects.
This Week in PSC (215) | 2026ā02ā11
In PSCāÆ215, the Perl Steering Council covered:
- A deep discussion around legal identifier name restrictions for security (no consensus yet) and a plan to broaden the conversation beyond p5p.
- The challenge of an absent maintainer for the dualālife Encode module.
- A decision to hold off on merging larger PRs (e.g., magicāÆv2 and attributesāÆv2) due to the upcoming freeze in this release cycle.
These updates give a clear snapshot of ongoing governance and core maintenance decisions within the Perl project.
Poplar Decisions
The post reflects on the challenge of rational decisionāmaking with a quirky, humanācentred anecdote, weaving in the idea that structured data modelsālike decision treesācan help bring objectivity to complex choices. The blend of storytelling and commentary on data structures adds a thoughtful and entertaining perspective for programmers thinking about reasoning and modeling in code.
Mojo with WebSocket
A practical, realāworld example of using Mojoliciousā builtāin WebSocket support to build an interactive online chat app in Perl, complete with multiple server variants and integration options like Redis or PostgreSQL. The repository showcases how easily Mojolicious can handle realātime bidirectional communication with WebSockets, making it a solid reference for Perl developers exploring eventādriven web apps.
Coding Agents using Anthropic and z.ai ā Presentation at the German Perl WorkshopāÆ2026
The post previews Maxās talk at the German Perl WorkshopāÆ2026, exploring how modern AI coding agents from Anthropic and z.ai can assist with Perl development, what differences exist between the models, and tips for getting them to write good code. Itās an engaging look at practical uses of agentic AI in realāworld programming contextsāa timely topic for anyone curious about AIāassisted development.
Beautiful Perl Feature: local, for Temporary Changes to Global Variables
This article highlights one of Perlās unique strengths, the local keyword, showing how it enables temporary, dynamic changes to global variables without permanent side effects. With clear examples manipulating %ENV, special Perl variables, and even symbolātable entries, it makes a compelling case for using local judiciously to solve realāworld problems that lexical scoping alone canāt.
PAGI::Server, Now with HTTP/2!
The announcement of PAGI::ServerāÆ0.001017 highlights experimental HTTP/2 support built on nghttp2, bringing both cleartext h2c and TLSābased HTTP/2 to Perl web services with automatic protocol detection and solid h2spec compliance. The writeāup explains why HTTP/2 matters for backend performance and modern use cases like gRPC and multiplexed APIs, and it also outlines other qualityāofālife improvements and operational fixes in the release.
Black Box Test Generator v0.28 Released
Version 0.28 of App::Test::Generator, the blackābox test case generator, has just been released with:
- Improved schema extraction and testāgeneration accuracy.
- Tighter detection of getter/setter methods.
- Better typing in generated tests.
These enhancements make it easier to produce honest, robust fuzz and corpusādriven test harnesses from your Perl modules.
Run::WeeklyChallenge
Run::WeeklyChallenge is a small but useful CPAN module that helps you automate running solutions to challenges from The Weekly Challenge site by passing one or more sets of JSONāformatted inputs to your code. It cleanly wraps your solution logic and inputāschema validation, making it easier to test and reuse challenge solutions programmatically.
DBIx::Class::Async
DBIx::Class::Async is a modern asynchronous wrapper for DBIx::Class that allows nonāblocking database operations in Perl, keeping the familiar DBIC interface while running queries in the background via futures. The latest update brings several improvements:
- Caching disabled by default (
TTL 0). - Automatic detection of nonādeterministic SQL functions (e.g.,
NOW(),RAND()) to safely bypass caching. - More precise cache invalidation on
UPDATE/DELETEusing primary keys. count()queries are no longer cached to guarantee accurate row counts.
These enhancements make asynchronous DBIC usage both safer and more reliable.
Syntax::Highlight::Engine::Kate
Syntax::Highlight::Engine::Kate provides Perl programs with robust syntax highlighting using the same engine that powers the Kate text editor. It supports a wide range of languages and can be integrated into commandāline tools, web applications, or any Perl script that needs to render highlighted source code.
- Engine: Kate editor
- Update: The latest release fixes Issue #23 in
Template.pm. ThetestDetectSpaces()regex now correctly matches only spaces and tabs, improving number highlighting in Perl and other languages. The testāsuite expected outputs have been updated to reflect the corrected highlighting behavior.
The Weekly Challenge ā 361
The Weekly Challenge by Mohammad Sajid Anwar invites you to step out of your comfort zone.
- Prize: $50 for the weekly winner.
- Monthly Champion: One champion is selected each month from all contributors, thanks to sponsor Lance Wicks.
This Weekās Tasks
- Zeckendorf Representation
- Find Celebrity
For more information, see the [FAQ].
RECAP ā The Weekly Challenge ā 360
A quick look back at last weekās contributions by Team PWC on the āText Justifierā and āWord Sorterā tasks (Perl & Raku). Below are several writeāups that showcase clean, idiomatic solutions.
TWCāÆ360 ā Highlights
| Title | Language(s) | Key Points |
|---|---|---|
| Full Circle | Perl, Raku | Straightforward Perl solutions; uses fc for caseāinsensitive comparisons; clear subroutine design. |
| Pertaining to a Subtlety of Sorting | Perl | Explains caseāinsensitive sort; uses Schwartzian transform; benchmarks Unicode caseāfolding nuances. |
| Perl Weekly Challenge: WeekāÆ360 | Perl, Raku | Presents both tasks with simple, idiomatic code; multiple examples; crossālanguage snippets. |
| Perl Weekly ChallengeāÆ360 | Perl | Oneāliner examples; integer arithmetic; caseāpreserving sorting; sample I/O for verification. |
| This is Exactly the Sort of Justification That I Was Looking For | Perl | Stepābyāstep padding logic; idiomatic sorting; clear explanations. |
| Justifying TIMTOWTDI | Perl | Wellāstructured solutions; caseāpreserving sort; centered padding; reusable code. |
| Word Crimes Are Justified | Perl, Raku, Python, Elixir | Multiālanguage walkāthrough; thoughtful explanations; demonstrates versatility. |
| Padding and Sorting | ā | Clear problem definitions; practical examples of centering and alphabetical ordering. |
| The Weekly Challenge ā 360: Text Justifier | Perl | Uses String::Pad; concise examples; easy verification of task mechanics. |
| The Weekly Challenge ā 360: Word Sorter | Perl | Caseāinsensitive sort; clean split/grep logic; test cases included. |
| Justify the Words | Lua, Raku, Perl, ⦠| Wellācommented solutions; discusses centered padding & caseāinsensitive sorting across languages. |
| Padding and Sorting (Python/Perl) | Python, Perl | Sideābyāside implementations; clear logic for padding & sorting. |
| Perl Power: Two Tiny Scripts, Big Learning! | Perl | Minimal scripts; emphasizes testādriven development; handles edge cases. |
Common Themes Across the Writeāups
- Idiomatic Perl: Use of
fc,String::Pad, and Schwartzian transforms. - CrossāLanguage Insight: Solutions often presented in Perl, Raku, Python, Lua, and even Elixir, highlighting transferable concepts.
- Testing: Most posts include test cases to verify correct padding, centering, and sorting behavior.
- Performance: Benchmarks and discussion of Unicode case folding show attention to efficiency.
How to Use This Collection
- Read a writeāup that matches your preferred language.
- Copy the core subroutines (e.g.,
justify_text,word_sorter). - Run the provided test cases to ensure correctness in your environment.
- Adapt the logic to your own challenge or project, using the discussed idioms as a guide.
Enjoy the solutions, and feel free to contribute your own take on the challenges!
Case handling
The examples and explanation of core techniques make it both beginnerāfriendly and technically sound.
2026.06 CĆD YN GYMRAEG
Weekly collections
NICEPERLās lists
- Great CPAN modules released last week.
- A couple of entries sneaked in by Gabor.
Do you use WhatsApp? Join the Perl Maven chat group!
Paris.pm monthly meeting
- Date: MarchāÆ11,āÆ2025
German Perl/Raku Workshop 2026 in Berlin
- Date: MarchāÆ16ā18,āÆ2025
The Perl and Raku Conference 2026
- Date & location: JuneāÆ26ā29,āÆ2026, Greenville, SC, USA
You joined the Perl Weekly to get weekly eāmails about the Perl programming language and related topics.
- Want to see more? See the archives of all the issues.
- Not yet subscribed to the newsletter? Join us free of charge!
Ā© Copyright Gabor Szabo
The articles are copyright the respective authors.