Introducing constant::string and constant::string::uc

If you're like me, you use a constant a lot (I may overuse it). I often use it to turn typos in words and fields into compile-time errors, and for that I usually create constants that either are the named the same as the word, or the word uppercased, like this

use constant +{ SERVICE => 'Service', INSTANCE => 'Instance' };

or

use constant +{ map +( $_ => $_ ), @constants }

and doing that too many times inspired the creation of constant::string and constant::string::uc.

Hello Datastar

Datastar is a new-ish entry in the world of hypermedia-oriented ,htmx alternatives, with a distinct focus on Server-Sent Events. It describes itself thus:

Datastar brings the functionality provided by libraries like Alpine.js (frontend reactivity) and htmx (backend reactivity) together, into one cohesive solution. It's a lightweight, extensible framework that allows you to:
  1. Manage state and build reactivity into your frontend using HTML attributes.
  2. Modify the DOM and state by sending events from your backend.

I added Perl for Datastar with Datastar::SSE, for the backend reactivity bits.

search.cpan.org

Where oh where can my search.cpan.org be?

The Onion

Veg of the Day