CPANscan logo

CPANscan

Recent Perl modules, releases and favorites.
Last updated 21 June 2026 08:31 PM
Perl logo

Identifier-PL-PESEL

Release | 21 Jun 2026 06:51 PM | Author: ERRNO | Version: 0.3
Validator for polish PESEL number
Identifier::PL::PESEL is a compact Perl module for validating Polish PESEL national identification numbers. It provides a simple object interface: instantiate with new and call validate($number) to receive 1 for a valid PESEL or undef for an invalid one, and validate will Carp::confess if you omit the argument. The module is intentionally lightweight and focused on format and checksum checking, making it a good choice when you need a minimal, dependency-free way to verify Polish IDs. The 0.3 release only updates package metadata.
Perl logo

Finance-Quote

Release | 21 Jun 2026 06:36 PM | Author: BPSCHUCK | Version: 1.70
Upvotes: 11 | CPAN Testers
Get stock and mutual fund quotes from various exchanges
Finance::Quote is a Perl toolkit for fetching stock, mutual fund and bond quotes from a wide range of internet sources and exchanges, exposing a simple object API where you create a quoter, call fetch with one or more methods and symbols, and receive a hash keyed by symbol and label (price, bid, volume, date, currency and many other fields). It bundles many exchange‑specific modules, supports configurable timeouts, optional failover between providers, and on‑the‑fly currency conversion via pluggable CurrencyRates modules (some require API keys), and it includes handy utilities for parsing dates, CSVs and scaled numeric values. The module is actively maintained to adapt scrapers and add API sources, most recently adding a Finnhub backend for API-based quotes and updating Google Finance parsing while introducing additional currency rate providers. You can install it from CPAN, it respects your HTTP proxy settings, and a small anonymous usage counter is enabled by default but can be disabled with the FQ_NOCOUNT environment variable.
Perl logo

CPANSA-DB

Release | 21 Jun 2026 05:26 PM | Author: BRIANDFOY | Version: 20260621.001
Upvotes: 4 | CPAN Testers
The CPAN Security Advisory data as a Perl data structure, mostly for CPAN::Audit
CPANSA::DB provides the CPAN Security Advisory dataset as a ready-to-use Perl data structure. It exposes a single method, db, which returns a hashref of all advisory reports so you can programmatically inspect, audit, or integrate CPAN security information. The module is primarily consumed by CPAN::Audit but can be used by any tool that needs the advisories. Each release includes a GPG signature and a GitHub attestation so you can verify the archive came from the official repository, and a JSON export of the same data is available if you prefer non-Perl formats. If you need a simple, verifiable source of CPAN security advisories for auditing, monitoring, or tooling, this module provides that in a minimal, dependable package.
Perl logo

Business-ISBN-Data

Release | 21 Jun 2026 05:26 PM | Author: BRIANDFOY | Version: 20260617.001
Upvotes: 3 | CPAN Testers
Data pack for Business::ISBN
Business::ISBN::Data is a data-only companion to Business::ISBN that supplies the official ISBN registration-group and publisher-range information used to parse, validate, and split ISBNs. You normally do not load it directly because Business::ISBN will load it for you, and the module ships with a copy of the ISBN Agency's RangeMessage.xml so you get authoritative ranges out of the box. If you need newer or alternate data you can point Business::ISBN at another RangeMessage.xml by setting the ISBN_RANGE_MESSAGE environment variable before loading the module, and if no file is available it falls back to built-in data or looks in the current directory to help bundled apps. Note that it requires Business::ISBN 3.005 or later to match the updated data structures addressing ISBN-13 handling. The project is actively updated with frequent data refreshes through June 2026, includes a recent fix to avoid unintended autovivification when reading ISBN_RANGE_MESSAGE, and is maintained on GitHub under the Artistic License 2.0.
Perl logo

Time-Str

Release | 21 Jun 2026 04:50 PM | Author: CHANSEN | Version: 0.92
Upvotes: 1 | CPAN Testers
Parse and format date/time strings in multiple standard formats
Time::Str is a compact, standards-focused toolkit for parsing and formatting date/time strings into Unix epoch values or precise component hashes, handling ISO 8601 and many internet and legacy formats such as RFC3339, RFC2822, HTTP, ASN.1, SQL, ECMAScript, Common Log Format and more, plus a permissive "DateTime" parser for real-world variants. Its API centers on str2time to produce numeric timestamps (including fractional seconds), str2date to return validated components with nanosecond precision preserved, and time2str to render timestamps with configurable precision or exact nanosecond output and either fixed offsets or DST-aware timezone objects. Time zone abbreviations are captured but not resolved automatically unless you provide a timezone_map or a timezone object, and the module interoperates cleanly with DateTime, Time::Moment and Time::HiRes. It ships with both a Pure-Perl implementation and an optional C/XS backend for speed, and the latest release adds a native Ragel-based C parser for the DateTime format that yields roughly a 20x performance improvement over the regexp parser. The module documents strict validation and precision behavior and exposes helpful constants, while noting some limitations such as English-only month and weekday names, no ISO week or ordinal-date support, and a supported year range of 0001–9999.
Perl logo

Mail-DMARC

Release | 21 Jun 2026 04:10 PM | Author: MSIMERSON | Version: 1.20260621
Upvotes: 5 | CPAN Testers: Pass 100.0%
Perl implementation of DMARC
Mail::DMARC is a mature Perl toolkit that implements the DMARC email authentication and reporting standard so mail servers, spam filters, and senders can check whether incoming messages are legitimately aligned with a domain's policy and generate or consume DMARC reports. You give it basic envelope and header metadata plus SPF and DKIM results and it evaluates policy conformance, returns a structured Result object, and can persist aggregate reports to a configurable SQL-backed store tested with SQLite, MySQL and PostgreSQL. The distribution includes a PurePerl engine and an optional libopendmarc XS backend, command line and web utilities for viewing, sending and receiving reports, and flexible report storage and delivery mechanisms over SMTP or HTTP. Recent releases add support for newer DMARC-related RFCs including RFC 9989 and RFC 9990 with agreement reporting, improved handling of messages with multiple From addresses, and better IDN conversion, making it a practical choice for operators who need full DMARC validation and reporting in Perl.
Perl logo

CPAN-FindDependencies

Release | 21 Jun 2026 03:05 PM | Author: DCANTRELL | Version: 3.14
Upvotes: 1 | CPAN Testers: Pass 100.0%
Show a module on the CPAN's dependency tree
CPAN::FindDependencies lets you discover the dependency tree for any CPAN module by consulting the CPAN package index and fetching distribution metadata or Makefile.PL files from a mirror, then returning a list of Dependency objects that include each module's name, distribution, required version and depth in the tree. It supports options to limit depth, add recommended or suggested modules, cache fetched metadata, specify one or more mirrors or an alternate perl core version, and choose whether missing Makefile.PL files should be executed to infer dynamic deps. The module prunes duplicates and automatically omits modules that are already in the specified perl core, so the output is focused and easy to reconstruct into a tree. You must have network access to CPAN or a local cache and startup can be slow when the index is fetched, and dynamic or platform‑specific requirements cannot always be resolved reliably. Be aware that enabling the Makefile.PL feature downloads and may run remote code so it should only be used when you accept that security risk.
Perl logo

Catalyst-Plugin-OpenIDConnect

Release | 21 Jun 2026 01:13 PM | Author: TFRAYNER | Version: 0.15
CPAN Testers: Pass 100.0%
OpenID Connect provider plugin for Catalyst
Catalyst::Plugin::OpenIDConnect turns a Catalyst web app into an OpenID Connect provider by adding the standard OIDC endpoints, JWT handling, state and code storage, and a reusable controller you extend in your app. It is not an OIDC client and is intended for applications that issue ID and access tokens to relying parties; configuration covers issuer metadata, RSA keys, and client registrations including redirect URIs and allowed scopes. The plugin mounts discovery, authorize, token, userinfo, JWKS and logout endpoints under a configurable namespace and can use either an in-memory store or a Redis backend for multi-process deployments, with built‑in PKCE, refresh token rotation, and many hardening fixes to address common security issues. Recent releases added extension points for custom user claims and scope handlers and fixed JWT signature compatibility with OpenSSL 3, making it easier to integrate with external JWT libraries and to extend claim behavior for specialized deployments. If you need to implement an authorization server inside a Catalyst application and want a tested, security-focused OIDC implementation you can configure and extend, this plugin is a strong fit.
Perl logo

AsposeCellsCloud-CellsApi

Release | 21 Jun 2026 01:07 PM | Author: ASPOSE | Version: 26.6.4
Upvotes: 1 | CPAN Testers: Unknown 100.0%
Aspose.Cells Cloud SDK for Perl
This module is a Perl client for the Aspose.Cells Cloud service that lets Perl programs work with spreadsheets in the cloud rather than handling files locally. It gives you a central configuration object for API credentials and endpoints and a simple factory-style helper to create API clients, so you can authenticate, call the REST endpoints and perform tasks like creating, reading, converting and manipulating Excel workbooks from Perl code. The package is aimed at developers who want to integrate cloud-based spreadsheet processing into Perl applications without implementing the HTTP and authentication plumbing themselves.
Perl logo

App-plockf

Release | 21 Jun 2026 12:53 PM | Author: SREZIC | Version: 0.05
CPAN Testers: Pass 100.0%
Execute a command while holding a flock lock
App::plockf is a tiny CPAN placeholder package that makes the plockf utility available; plockf runs another command while holding a file lock so you can serialize access to a resource or prevent multiple instances of a script or cron job from running concurrently. The App::plockf distribution itself is just a CPAN packaging wrapper and does not add new functionality beyond exposing plockf, which is a compact, well maintained tool with only minor fixes over time and a recent test fix for Windows.
Perl logo

Text-Names-Abbreviate

Release | 21 Jun 2026 11:09 AM | Author: NHORNE | Version: 0.03
CPAN Testers: Pass 100.0%
Generate abbreviated forms of personal names
Text::Names::Abbreviate provides a small, easy way to turn full personal names into common abbreviated forms such as initials, compact strings, or initials plus the full last name, and supports both "First Middle Last" and "Last, First Middle" input styles with options for output order, format and the separator between initials. Single-word names are returned unchanged and initials are derived verbatim from each component so punctuation or digits are preserved. The module validates input and croaks on missing or invalid parameters, and warns that formats like "compact" or "initials" are lossy so feeding their output back in will not recover the original structure. The recent 0.02 release improved robustness and testing by adopting Params::Get, adding fuzz testing in GitHub Actions, fixing edge cases including a bug where abbreviate('0') failed, and expanding the documentation and test suite.
Perl logo

DBIx-Class-MockData

Release | 21 Jun 2026 10:26 AM | Author: MANWAR | Version: v1.0.0
CPAN Testers: Pass 44.7%Fail 53.0%N/A 2.3%
Generate mock test data for DBIx::Class schemas
DBIx::Class::MockData is a utility for quickly populating DBIx::Class schemas with realistic, randomized test data so you can exercise queries, relationships and fixtures without handcrafting rows. You give it a connected schema and the module introspects your result sources, figures out foreign key insertion order, and inserts values matched to each column's declared data_type while salting unique keys to avoid collisions. It supports targeted generation via only or exclude lists, per-table row counts, custom column generators, a dry-run mode for previewing output, and safe operations to deploy or truncate tables with an explicit wipe option for destructive resets. A command line tool is included for one-off runs and recent releases focused on speed and usability, adding bulk insert mode for up to 10x faster population and a truncate operation for fast refreshes, making it a practical choice whenever you need dependable test data for DBIx::Class-based applications.
Perl logo

POE-Component-Server-JSONUnix

Release | 21 Jun 2026 09:28 AM | Author: VVELOX | Version: v0.0.1
CPAN Testers: Pass 100.0%
Pluggable JSON-over-Unix-socket server for POE
POE::Component::Server::JSONUnix is a lightweight, event-driven JSON-over-Unix-socket server built on POE that provides a simple RPC-style interface for local control and interprocess communication. Clients send newline-delimited JSON objects containing a command, optional args, and an optional id, and handlers return JSON envelopes with status and results or errors, so malformed requests and handler failures are reported without disturbing other clients. You add commands at startup via a commands hash, at runtime with register, or by subclassing cmd_* methods, and handlers may reply synchronously or keep a context object to respond asynchronously later. The server includes handy built-ins like ping and commands, removes stale socket files but will not clobber an active listener, lets you set socket permissions, and defaults to line-based framing while allowing POE::Filter::JSON for pretty-printed input. It depends on POE and JSON::MaybeXS and is aimed at daemons, command-line tools, and other local processes that need a simple, extensible control or RPC endpoint.
Perl logo

oEdtk

Release | 21 Jun 2026 09:21 AM | Author: GRECHARY | Version: 2.1064
CPAN Testers: Pass 100.0%
A module for industrial printing processing
oEdtk is the main module of an open source toolkit for industrial printing processing that provides a simple, documented framework to parse fixed-width record files and build formatted outputs. It opens and closes job filehandles, lets you declare record templates that map fixed-length fields into a global data array, and lets you attach user callbacks to run before, during, and after record extraction. You can also define sprintf-style output templates, and dynamically erase or redefine record types at runtime, so it is useful for automating batch jobs that transform legacy or production print/data streams into composed documents. The module is presented primarily as the documented entry point for the oEdtk toolkit and is distributed under the GNU GPL with no warranty.
Perl logo

HTTP-Request-FromCurl

Release | 21 Jun 2026 07:09 AM | Author: CORION | Version: 0.57
Upvotes: 3 | CPAN Testers: Pass 89.9%N/A 10.1%
Create a HTTP::Request from a curl command line
HTTP::Request::FromCurl converts curl command lines into Perl HTTP::Request objects so you can turn examples copied from documentation or browser developer tools into code for LWP, HTTP::Tiny or similar clients. You pass a curl-style command or argv array and the module returns one or more HTTP::Request::CurlParameters objects that encapsulate the request parameters and can produce an HTTP::Request for your user agent. It recognizes many common curl options, supports multiple URL expansion and optional inlining of file contents, and can regenerate curl or other client snippets for round‑tripping. There are some limitations to be aware of such as incompatible curl cookie file formats, file uploads and body files being slurped into memory, certain curl features like --next being unsupported and a small set of options intentionally ignored, but these are documented. The latest release fixes handling of empty passwords in Authorization headers and adds support for the commonly used --follow option.
Perl logo

DesktopWorkspaceRoles-Standard

Release | 21 Jun 2026 12:05 AM | Author: PERLANCAR | Version: 0.001
CPAN Testers: Pass 100.0%
Standard set of roles for DesktopWorkspace
DesktopWorkspaceRoles::Standard provides a ready-made collection of roles for use with the DesktopWorkspace framework, offering common behaviors and interfaces you can compose into workspace objects so you do not have to recreate basic functionality. It is aimed at developers building or extending DesktopWorkspace-based applications or plugins who want consistent, tested building blocks to speed development and reduce boilerplate. The module is lightweight, maintained on GitHub, and welcomes contributions and bug reports.
Perl logo

YAML-LibYAML

Release | 20 Jun 2026 10:21 PM | Author: TINITA | Version: v0.908.0
Upvotes: 60 | CPAN Testers: Pass 100.0%
Perl YAML Serialization using XS and libyaml
YAML::LibYAML is the Perl binding (distributed as YAML-LibYAML and better known as YAML::XS) that gives you fast, robust YAML parsing and generation by wrapping the libyaml C library with XS. It provides familiar Load and Dump routines and file helpers so Perl programs can read and write YAML efficiently while handling anchors, aliases, tags, regexps, tied variables, Unicode, and various Perl types including blessed references when explicitly allowed. The module is actively maintained with security-conscious defaults such as disabling automatic loading of blessed objects and recent fixes for YAML 1.2 compatibility, boolean handling, and several memory and parsing bugs. Use it when you need a high-performance, well-tested way to serialize or parse YAML from Perl and when you want explicit control over object loading and the latest libyaml behavior.
Perl logo

Weasel-Driver-Selenium4

Release | 20 Jun 2026 08:33 PM | Author: EHUELS | Version: 0.01
CPAN Testers: Pass 100.0%
PHP's Mink inspired multi-protocol web-testing library for Perl
Weasel::Driver::Selenium4 is a lightweight adapter that lets the Weasel browser-automation framework drive real browsers via Selenium WebDriver 4 by wrapping Selenium::Client, providing the standard Weasel driver operations like navigating pages, finding elements, clicking, double-clicking, typing, executing scripts, taking screenshots and waiting for conditions. It exposes simple configuration for Selenium capabilities, window_size and a millisecond wait_timeout and includes helpers to update the timeout and window size on a running session, while capability changes take effect after restarting the session. Use this module when you are working with the Weasel test framework and need a ready-made Selenium 4 backend for browser-based tests.
Perl logo

Syntax-Infix-ConditionalSplice

Release | 20 Jun 2026 07:30 PM | Author: LNATION | Version: 0.01
CPAN Testers: Pass 53.2%N/A 46.8%
A short-circuiting < ?> operator for conditional list elements
Syntax::Infix::ConditionalSplice provides a lexically scoped infix operator ?| that makes it trivial to conditionally splice elements into a list, so you can write things like $verbose ?| '--verbose' inside an argument list instead of the noisier COND ? LIST : (). The operator short-circuits so the right-hand expression is only evaluated when the condition is true, and it is context-aware so in list context it flattens the supplied list into the surrounding list while in scalar context it returns the list's last value or undef when false. The operator has sensible precedence relative to commas and logical operators and you can parenthesize the right side to include multiple elements. Note that it relies on Perl 5.38 or newer and will not install on older Perl releases.
Perl logo

Syntax-Infix-OptionalChain

Release | 20 Jun 2026 07:07 PM | Author: LNATION | Version: 0.01
CPAN Testers: Pass 48.2%N/A 51.8%
A safe-navigation < ?- >> operator for objects, hashes and arrays
Syntax::Infix::OptionalChain provides a lexically scoped infix operator "?->" that implements safe navigation in Perl so you can walk into objects, hashes and arrays and get undef instead of a fatal error when a link in the chain is missing. The right-hand bareword is resolved at runtime so if the left value is a blessed object with that method it calls the method, if it is a HASH reference it performs a key lookup, and if it is an ARRAY reference it treats the bareword as a numeric index; an undef left-hand operand causes an immediate undef result and no autovivification happens. Blessed hashrefs or arrayrefs fall through to structural access when the method does not exist, defined but non-navigable values croak, and the operator pairs naturally with // for defaults. Note that the right-hand side must be a compile-time bareword so you cannot pass arguments, compute keys, or use negative indices. The module is implemented on top of Infix::Custom with an XS navigator, requires Perl 5.38 or newer, and this release is the initial 0.01.
Perl logo

Infix-Custom

Release | 20 Jun 2026 07:03 PM | Author: LNATION | Version: 0.01
CPAN Testers: Pass 64.1%N/A 35.9%
Lexically-scoped custom infix operators
Infix::Custom lets you declare your own binary infix operators in Perl so expressions like "a OP b" can be made to call a Perl sub, act as a native binary operator, or be handled by a C-level builder, and those operators are recognized and lowered at compile time so there is no added runtime parsing cost beyond the work of the operation itself. You register a glyph and choose a lowering mode: call mode maps the infix to a Perl sub, method mode treats the right hand side as a bareword to enable natural looking safe-navigation like "?->", and binop mode maps directly to a built-in operator for zero call overhead. Declarations are lexical so operators only apply where imported and can be rebound or removed in nested scopes. There is also an escape hatch for XS authors to build custom optrees at C level. This requires Perl 5.38 or newer because it relies on the core infix plugin hook, so use it when you want readable, compile-time custom operators with predictable performance.
Perl logo

Perl-Critic-Policy-ControlStructures-LoopsRequireLabels

Release | 20 Jun 2026 12:50 PM | Author: DJZORT | Version: 0.01
CPAN Testers: Pass 78.4%N/A 21.6%
Require labels on loops and their break keywords
Perl::Critic::Policy::ControlStructures::LoopsRequireLabels is a Perl::Critic policy that enforces explicit labels on loops and on loop-control keywords like next, last, and redo so the target of a break is always obvious and less likely to break during refactoring. It offers three modes: always, which requires labeled loops and labeled break keywords everywhere; nested, the default, which requires labels for loops that are nested or whose body exceeds a configurable max_lines threshold; and max_lines, which only enforces labels when a loop body is longer than the configured line count. The policy also treats continue blocks as part of their loop and flags bare breaks when any ancestor loop carries a label to avoid ambiguous targets. Configure it in your perlcriticrc to tighten control-flow clarity in codebases where nested loops or long loop bodies make break targets hard to track.
Perl logo

Gherkin

Release | 20 Jun 2026 07:09 AM | Author: CUKEBOT | Version: 41.0.0
Upvotes: 2 | CPAN Testers: Pass 100.0%
A parser and compiler for the Gherkin language
Gherkin is the Perl implementation of the Gherkin language parser and compiler used by the Cucumber project. It reads feature files (including support for Markdown-based Gherkin in recent releases), parses them according to the official grammar, and emits a stream of Cucumber::Messages protobuf objects encoded as NDJSON so other tooling in the Cucumber pipeline can consume them. The module exposes streaming APIs such as from_paths and from_source that accept a user-supplied id generator and a sink callback to receive Envelope messages, and you can choose whether to include the original source, the parsed AST, or the compiled "pickles" in the output. It handles source encodings, is intended for building higher-level Cucumber tools in Perl, and since version 22 it emits Cucumber::Messages objects instead of plain hashes. The project is actively maintained, ships under the MIT license, and is a good fit if you need robust, language-compliant Gherkin parsing in Perl.
Perl logo

Cucumber-Messages

Release | 20 Jun 2026 07:06 AM | Author: CUKEBOT | Version: 33.0.3
CPAN Testers: Pass 98.2%N/A 1.8%
A library for (de)serializing Cucumber protocol messages
Cucumber::Messages is a Perl library that implements the Cucumber messaging protocol and makes it easy for Perl programs to produce and consume the NDJSON event stream used across the Cucumber ecosystem. It provides in-memory classes for every message type—envelope, source, gherkin AST, pickles, test cases, step results, attachments and more—plus simple serialization and parsing helpers so you can call methods like to_json on objects or Envelope->from_json on NDJSON lines. Use it when you need to integrate Perl tools with Cucumber formatters, test runners or CI pipelines, or when you want structured access to attachments, timestamps and other test metadata; the library also supports externalized attachments to avoid embedding large binaries and is released under the MIT license.
Perl logo

Algorithm-QuadTree-XS

Release | 20 Jun 2026 04:45 AM | Author: BRTASTIC | Version: 0.06
Upvotes: 1 | CPAN Testers: Pass 98.9%Unknown 1.1%
XS backend for Algorithm::QuadTree
Algorithm::QuadTree::XS is a high-performance XS (C) backend for the Algorithm::QuadTree family that gives you a drop-in, compatible replacement for the pure-Perl implementation and is used automatically when available. It provides the same quadtree API so you can index and query 2D shapes like rectangles and circles without changing your code, while delivering much faster insert and search operations and dramatically reduced tree-clearing time in recent releases. If your application needs spatial indexing or collision-style queries and the pure-Perl version feels slow, this module provides a straightforward way to get a significant speedup with minimal fuss.
Perl logo

Algorithm-QuadTree

Release | 20 Jun 2026 04:38 AM | Author: BRTASTIC | Version: 0.6
CPAN Testers: Pass 100.0%
A QuadTree Algorithm class in pure Perl
Algorithm::QuadTree is a pure-Perl spatial index that stores rectangular and circular objects in a hierarchical quadtree so you can rapidly find everything that intersects a given rectangular or circular region. You create the tree by giving map bounds and depth, add objects (as rectangles or circles) with add, and then use getEnclosedObjects to retrieve items that overlap a query area; objects can be removed or the whole tree cleared and you can set a window and scale to support zoomed views. The module uses a pure-Perl backend by default but will use an optional XS backend if installed for better performance. It is handy for fast region queries and simple collision detection in canvases or map-like data, and note that you are responsible for providing unique object identifiers if you need them to be distinct.
Perl logo

App-CommonPrefixUtils

Release | 20 Jun 2026 12:05 AM | Author: PERLANCAR | Version: 0.002
CPAN Testers: Pass 96.6%N/A 3.4%
Utilities related to common prefix
App::CommonPrefixUtils provides small command line tools and supporting functions for finding and manipulating common prefixes in lists of strings, including the utilities common-prefix, majority-prefix, remove-common-prefix and strip-common-prefix. It is useful when you need to detect the longest shared starting substring across many labels or filenames or to derive a prefix that is shared by the majority of items and then optionally remove or strip that prefix. The included library functions common_prefix and majority_prefix return an enveloped result designed for programmatic use, using an HTTP-like status code, a human-readable reason, an optional payload with the computed prefix, and optional metadata. The 0.002 release added the common-prefix and majority-prefix CLI wrappers to make these operations directly available from the command line.
Perl logo

Switch-Declare

Release | 19 Jun 2026 09:43 PM | Author: LNATION | Version: 0.06
CPAN Testers: Pass 96.7%N/A 3.3%
Compile-time, lexically-scoped switch/case
Switch::Declare provides a compile-time, lexically-scoped switch/case keyword for Perl that lowers the whole construct to ordinary Perl ops so there is no runtime parser overhead. You write switch (EXPR) { case ... { ... } default { ... } } and the scrutinee is evaluated exactly once, the first matching case wins, and there is no fallthrough. Cases support a compact, predictable pattern grammar including numeric and string literals, regexes, ranges and lists, predicate subs, ref/reftype and isa checks, named constants, runtime comparisons and runtime regexes, and you can destructure the matched value into fresh lexicals with -> PATTERN for convenient per-arm bindings. The implementation is undef and type safe so non-matching or undef inputs do not warn or miscompare, and common string-only switches are automatically lowered to a static hash lookup for fast dispatch. Performance is close to hand-written if/elsif chains for most patterns, with numeric comparisons paying a small extra cost for safety, and the compile-time lowering keeps the generated code tight and efficient. If you want a readable, safe, and performant switch construct that integrates with Perl scoping and offers destructuring it is likely a good fit.
Perl logo

Graphics-Toolkit-Color

Release | 19 Jun 2026 09:35 PM | Author: LICHTKIND | Version: 2.20
Upvotes: 1 | CPAN Testers: Pass 97.1%N/A 2.9%
Calculate color (sets), IO many spaces and formats
Graphics::Toolkit::Color is a high‑level Perl API for creating, converting and manipulating colors and color sets aimed at colors for screen output. You build lightweight, read‑only color objects from names, hex, CSS strings, numeric tuples or many named formats, then convert them between dozens of color spaces, format their values for output, check gamut validity and look up or approximate human‑readable color names. It also provides practical color operations such as mix, invert, add_value/set_value and a suite of convenience modifiers to lighten, darken, saturate, desaturate, tint, shade and tone, plus generators for gradients, complements, analogous palettes and clusters of similar colors. The module emphasizes perceptual correctness by using RGB as the I/O format while performing many calculations in perceptually uniform spaces like OKLAB or OKHSL, supports many RGB profiles and modern spaces, offers multiple output formats and an is_in_gamut helper, and ships with no runtime dependencies. The recent 2.20 release is a notable feature bump that added the HSL‑family OKHSL/OKHSV/OKHWB spaces, the new lighten/darken/saturate/desaturate/tint/shade/tone methods, improved docs and more flexible error handling, making it easier to produce visually consistent color manipulations.
Perl logo

Destructure-Declare

Release | 19 Jun 2026 09:29 PM | Author: LNATION | Version: 0.01
CPAN Testers: Pass 98.7%N/A 1.3%
Lexically scoped structural destructuring let
Destructure::Declare installs a compile-time, lexically scoped let keyword that makes it easy to unpack arrays, hashes and lists into real my variables using simple pattern syntax. Array patterns [ ... ] treat the right-hand side as an arrayref, hash patterns { ... } treat it as a hashref and ( ... ) destructures a list in list context. The module supports nested patterns, per-slot defaults that use // and are evaluated lazily, holes to skip slots, and trailing slurpy captures like @rest and %rest for remaining elements or keys. The right-hand side is evaluated exactly once and the entire pattern is parsed at compile time and lowered to ordinary lexical declarations so runtime overhead is minimal, and flat patterns can lower to a single native list assignment for hand-written assignment speed. The distribution also publishes its compile-time engine for reuse by other modules. This is the initial 0.01 release implementing these features.