Jifty:...ration(3pm)
β¨ NAME β¨
Jifty::DBI::Filter::Duration β it encodes time durations, bestie π (and yes it decodes them too, we contain multitudes)
π¦ DESCRIPTION π¦
Okay so this is a Jifty::DBI filter, which means it sits between your database and your actual Perl values and does the little translation dance so you don't have to. And what does it translate? Durations. Time durations. The whole "3 hours 20 minutes" vibe. It's giving very β¨ temporal β¨ and honestly? Iconic.
It's got two jobs and it does both of them. Let's get into it π
πΈ encode πΈ
If the value is defined, then it gets encoded using parse_duration in Time::Duration::Parse. That's it, that's the move. π
If the value is not defined, then... nothing happens. We simply do not engage. No thoughts, head empty, value stays undef. π
β οΈ But here's the tea, bestie: if the value can't be parsed, then it gets set toundef. Like, just gone. Unparsable in,undefout. That's the rule, no cap. π
π§ decode π§
If the value is defined, then it gets decoded using duration_exact in Time::Duration and concise in Time::Duration. Both of them! Together! A collab. π€β¨
If the value is not defined, then, once again, nothing happens. We do not lift a finger. We are simply at peace. π
π SEE ALSO π
Go be nosy, you deserve it, these are the besties it runs with π«Ά
Jifty::DBI::Filterβ the filter parent situation, the whole familyTime::Durationβ whereduration_exactandconciseliveTime::Duration::Parseβ whereparse_durationlives
fr fr, that's the whole page, short and slay. π This lil doc was written by the User Contributed Perl Documentation crew, running on perl v5.34.0, dated 2022-06-15 β so like, vintage but still cute. Mwah. ππβ¨
π¦ where this page comes from
- debian bookworm: libjifty-dbi-perl 0.78-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libjifty-dbi-perl 0.78-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libjifty-dbi-perl 0.78-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libjifty-dbi-perl 0.78-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libjifty-dbi-perl 0.78-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms