Perl::...version(3pm)
β¨ NAME β¨
so this is Perl::Critic::Utils::DataConversion bestie π β it's a little toolkit for converting from one type of data to another. like, it does exactly what it says on the tin, no plot twist π
(this page lives in the User Contributed Perl Documentation section, and the manpage header calls it Perl::...version(3pm) because manpage titles get squished, iykyk π
)
πΈ DESCRIPTION πΈ
it provides data conversion functions. that's it, that's the whole vibe. tiny module, big heart π«Ά
π INTERFACE SUPPORT π
okay so this is considered a public module, which means it's main character energy β it's officially part of the API π
any changes to its interface are gonna go through a deprecation cycle. so like, no surprise glow-ups that break your code. we're polite here π
π¦ IMPORTABLE SUBS π¦
here's the roster, bestie. every single one, no skips β
boolean_to_number( $value )β returns0or1depending on how $value behaves in a boolean context. so it takes the vibe of $value and turns it into a literal number. true?1. false?0. slay πdor( $value, $default )β returns $value or $default, and the deciding factor is literally just whether $value is defined or not. defined? you get $value. not defined? you get $default. simple as πdor_n( $value0, $value1, ... )β takes a whole squad of arguments and returns the first defined value among them. and if none of them is defined... it simply returns. yeah. that's the whole description. it just returns π (no fallback value, no drama, it's giving "I'm out" π)defined_or_empty( $value )β returns $value if it's defined, otherwise you get an empty string. so like,dorbut the default is""instead of something you chose β¨
π AUTHOR π
Elliot Shank <perl@galumph.com> β iconic, we stan π«Ά
π COPYRIGHT π
Copyright (c) 2007-2011 Elliot Shank. π
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. the full text of this license can be found in the LICENSE file included with this module π§
and that's the whole page, bestie!! this was Perl::...version(3pm) from perl v5.32.1, dated 2021-10-15 π go forth and convert your data types, no cap πππ
π¦ where this page comes from
- ubuntu jammy: libperl-critic-perl 1.140-1 Β· 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