Originally published at Perl Weekly 770
Hi there,
I like to believe that I belong to the old school of testing i.e. Test::More. That being said, every now and then I come across a magical test workflow. One of them is App::Yath. The biggest and pleasant surprise is that both were presented by none other than Chad Granum. Although I love the idea, I find it hard to adapt to it. I have to force myself otherwise it won't happen. I wrote a short blog post as a reminder to myself while working on this editorial. I can refer to it next time I am changing existing code or adding new code.
Speaking of testing, Herbert Breunung shared a blog post explaining how Test::Builder helped him create his own test suite. This reminded me how I did exactly that in 2010 to create Test::Map::Tube for my routing framework, Map::Tube. It makes me feel quite old now!
Enjoy rest of the newsletter.
--
Your editor: Mohammad Sajid Anwar.
Announcements
The London Perl and Raku Workshop 2026
Just a heads up: The next LPW is planned to be in November 2026.
PPC Summer 2026 - Call for Participation!
Brett Estrade, who is a member of the Perl Community Conference (PPC) organising committee, has released a call for participants for the Summer 2026 PPC. He notes the group's success in the areas of scientific research and community building through the use of independent Perl conferences and asks for speakers to submit proposals to present their work via the Papercall system to help keep the momentum going.
Articles
Who tests the tester? Me !!!
In the article, Lichtkind shows how to apply the Test::Builder::Tester module to check your own test functions for correctness. He shares real-life example of using the is_tuple() function that he has developed to aid in creating a test for the GTC project.
This week in PSC (222) | 2026-04-25
Ihe Perl Steering Council got together at the 2026 Perl Toolchain Summit (Vienna). During this meeting, the group discussed the current status of Perl 5.44. Most blockers have been resolved and EOL workflow has been put in place. Finalisation of details for the next stable release is currently taking place.
Importance of Repositories in Public
In this blog post, Mikko argues that keeping project repositories publicly accessible is an important practice even when no new contributions are anticipated. Having a project public on GitHub preserves historical context, serves as an example of quality work for others, and provides a source of useful data for the open-source community.
AI as a Chance - Opinion
In this article PetaMem discussed how through AI we will have access to new ways to enhance our creative processes (as opposed to replacing them), through developing a partnership with AI; allowing developers and creators alike use the technology of AI to automate repetitive processes and create opportunities for problems to be solved and new ideas developed through creative innovation.
Discussion
AI Contributions to CPAN: The Copyright Question
In his article, Todd explores some of the legal issues surrounding code that is generated by AI and available through CPAN, and whether or not these AI-generated contributions are eligible for copyright protection and/or a legal license. He also cautions maintainers about the use of black box LLMs, which do not make public their training data, and encourages the Perl community to develop guidelines for the proper protection of the Perl software ecosystem from future disputes arising from improper use of code generated by LLMs.
Web
Use Your Powers Only for Good, Clark
Dave dissects a really good looking SPAM email made by an AI LLM to show us all how the world will look in future with AI created outreach. Even though the spam had accurately scraped Dave's background and book titles, Dave believes that this creates the illusion of understanding but does not demonstrate the LLM has any real knowledge of either Dave's values or business model. Dave further states that this type of outreach is now cheaper and easier than ever though the deployment of AI to create large amounts of unsolicited SPAM.
The Weekly Challenge
The Weekly Challenge by Mohammad Sajid Anwar will help you step out of your comfort-zone. You can even win prize money of $50 by participating in the weekly challenge. We pick one champion at the end of the month from among all of the contributors during the month, thanks to the sponsor Marc Perry.
The Weekly Challenge - 371
Welcome to a new week with a couple of fun tasks "Missing Letter" and "Subset Equilibrium". If you are new to the weekly challenge then why not join us and have fun every week. For more information, please read the FAQ.
RECAP - The Weekly Challenge - 370
Enjoy a quick recap of last week's contributions by Team PWC dealing with the "Popular Word" and "Scramble String" tasks in Perl and Raku. You will find plenty of solutions to keep you busy.
Perl Weekly Challenge 370: Popular Word
Abigail offers a superb example of processing text for the "Popular Word" task using the ability of Perl's regex engine to process words without considering case and complex punctuation marks. This solution is unique because it demonstrates a high-performance solution for filtering out banned words while maintaining concise and easily readable code.
Perl Weekly Challenge 370: Scramble String
Abigail used a clever recursive method to take on the challenge of the "Scramble String" problem. The use of clear base cases and logic to explore possible points to split and swap all contribute to the final solution being an excellent example of how to solve complex problems with string transformations, using a valid solution and providing a framework that can be used to solve other complex problems involving string transformations.
Popular Scramble
Arne's experience in comparing Raku's expressive power vs. Perl with respect to the solutions of these two challenges are at the heart of this review. He also demonstrates how to use Raku's built-in Bag and Any types to simplify complex logic with clean, idiomatic code. This article is a great reference for developers who want to learn how to use modern functional programming patterns effectively.
PWC 370 Scramble On, Scramblin' Man
Bob has created a detailed breakdown of the Scramble String problem, looking at the need to use memoisation to avoid redundantly calculating recursive algorithms. Bob has developed a very clearly constructed solution to the Scramble String problem using test-first development which is a perfect demonstration of how to keep performance and readability on complex branching logic.
Perl Weekly Challenge: Week 370
In this article, there is a thorough comparison made between two languages: Perl and Raku. The many modern capabilities of Raku, such as having a Bag data structure and being natively supportive of methods for manipulating strings, resulted in solving the stated problem while producing significantly less code than what is generated by using Perl to do the same thing.
Scrambled Bans
Jörg has concentrated his efforts solely on providing a high quality Perl solution to this challenge. The way he solves "Scramble String" is especially impressive because he uses a recursive solution that processes challenging partitioning and swapping of strings, using clean and idiomatic Perl programming.
Perl Weekly Challenge 370
W. Luis Mochán offers a mathematically rigorous and elegant take on Challenge 370 using Perl. For Task 1, he utilises a compact approach by normalising the input with lc and regex, then applying a frequency count. His review is particularly positive about the clarity and efficiency of using a single hash to filter out banned words while identifying the maximum frequency in one pass. For Task 2, he implements a recursive solution and highlights the technical necessity of caching results to avoid the exponential growth of possibilities in longer strings.
Scrambling Back and Forth
Matthias's submission for Task 1, he has used a concise and efficient one-liner with List::UtilsBy::max_by to count how many times words appear and in doing so stores a reference to the 'most popular' result while processing all results in a single pass. With respect to Task 2, Matthias did not limit himself to performing a simple recursive search as in previous weeks; however, he developed a Reverse Scramble algorithm, which is performing this task as a sequence of sorting in which strings become indexes of streaks representing their sorted order to allow for efficient verification of scrambling operations performed.
The scramble can not stop you / from becoming popu-ler… lar
Packy's polyglot Challenge 370 features solid code samples in Perl, Raku, Python, and Elixir that showcase how to solve the problem multiple ways using different programming languages. He shows how using Elixir's pipe operator or Raku's Bag can help efficiently transform and filter the paragraph from "Most Popular Word". He also demonstrates a consistent, recursive approach to solving the problem using the same recursive logic, with code examples in each of the four languages, while adapting to the specific syntax and idioms of each language, in his example "Scramble String".
Words and more words
Peter implements a clean regular expression approach to normalising the text and eliminating any banned words in Popular Word, while also provides a completely recursive solution in Scramble String that clearly demonstrates splitting and swapping parts of the string in order to illustrate the property of being scrambled.
The Weekly Challenge - 370: Popular Word
Reinier solution includes a simple regular expression to remove punctuation characters and a hash to count the number of occurrences of each valid word. This makes it easy to identify the most frequently used word that is not on a banned list, and provides an easily readable model from which to analyze text.
The Weekly Challenge - 370: Scramble String
Reinier's demonstrates pruning as an optimisation technique. If the characters sorted for both strings do not match (meaning they are not anagrams), the function returns false without going through all remaining recursive levels.
The Weekly Challenge #370
Robbie's high-performance Perl solutions employ algorithmic efficiency and strong input validation. In Task 1, he uses a fast normalisation method along with a hash-based frequency counting scheme to isolate the most popular word. In Task 2, Robbie's "Scramble String" implementation is notable for being a recursive Divide-and-Conquer strategy, providing an additional speedup by implementing a pre-check anagram filter to eliminate expensive recursive calls to incompatible strings.
Popular Scramble
Roger shown how to use a specialised programming tool like Counter in Rust to find popular words with only a few lines of code. In addition, the example in PostScript is an interesting concept as it shows how to create a counted hash from scratch using the examples provided in the Rust program as a reference.
Popular Scrambling
Simon demonstrates Task 1 by methodically normalising strings and counting strings using hashes in order find the word with the highest occurrence. His solution for Task 2 highlights the use of recursion when solving the problem, and optimises by checking if two strings are anagrams with a "fail-fast" method; this way, all non-anagrams can be filtered out before going through the more complex process of recursion.
Perl Tutorial
A section for newbies and for people who need some refreshing of their Perl knowledge. If you have questions or suggestions about the articles, let me know and I'll try to make the necessary changes. The included articles are from the Perl Maven Tutorial and are part of the Perl Maven eBook.
Testing in Perl
The 'slides' with all the examples that are used in the online course.
Rakudo
2026.16 Selkie TUI Framework
Training
Testing in Perl
While we are still recording the live sessions of the Testing in Perl you can also watch the previous episodes on the Code Maven Academy web site. Usually it is for paying subscribers only, but for the next couple of day you can still access it free of charge. You only need to register on the web site.
Weekly collections
NICEPERL's lists
Great CPAN modules released last week.
Events
Perl Maven online: Testing in Perl - part 5
April 30, 2026
Boston Perl Mongers virtual monthly
May 12, 2026
The Perl and Raku Conference 2026
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!
(C) Copyright Gabor Szabo
The articles are copyright the respective authors.
Top comments (0)