Jifty:...orable(3pm)

πŸ“¦
version 0.78 Β· 2 versions
  • 0.78 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.78 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Jifty::DBI::Filter::Storable πŸ’–

okay so bestie, gather round, because this is genuinely one of those little modules that does one thing and does it immaculately. the manual name is Jifty::DBI::Filter::Storable and it lives in section 3pm of the perl docs, iykyk.


✨ NAME ✨

Jifty::DBI::Filter::Storable β€” Encodes arbitrary data using Storable πŸŽ€

like. that's the whole job. and she ate.


🌸 DESCRIPTION 🌸

so the vibe here is: this filter lets you stash arbitrary Perl data structures inside a column of type blob πŸ’… and the way it pulls that off is by handing the whole thing over to Storable to serialize it. no cap, that's it. your weird nested hash-of-arrays-of-objects? your extremely unhinged data structure you built at 3am? she'll hold it for you 🫢


πŸ¦‹ encode πŸ¦‹

if the value is defined, then it gets encoded using nfreeze in Storable ✨

and if the value is not defined? she simply does nothing. does not touch it. does not move. not me being unbothered πŸ’€


🌈 decode 🌈

if the value is defined, then it gets decoded using thaw in Storable 🌸

otherwise? nothing happens. otherwise she does nothing. periodt. πŸŽ€

fr fr this is the round trip β€” nfreeze on the way in, thaw on the way out. iconic behavior tbh.

⭐ SEE ALSO ⭐

  • Jifty::DBI::Filter β€” the parent situation, the blueprint, the main character πŸ‘‘
  • Storable β€” the actual muscle behind the whole operation πŸ”₯

perl v5.34.0 Β· 2022-06-15 πŸ¦‹

and that's the whole page, bestie β€” documented, dated, and delivered with love. go forth and store your arbitrary data structures responsibly πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from