How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

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

calendar_today June 29, 2026 person James domain perl

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 . Basically they are very thin wrappers over constant, creating the words as constants, either as is or in uppercase The equiva

open_in_new Read original post