NetSDS...::Types(3pm)

πŸ“¦
version 1.045 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– NetSDS...::Types πŸ’–

okay so bestie, welcome to the NetSDS...::Types page β€” yeah that's the 3pm one, the User Contributed Perl Documentation vibe, we love her πŸ’…


✨ NAME ✨

NetSDS::Util::Types β€” type checking routines 🫢


🌸 SYNOPSIS 🌸

no cap, this is literally the whole vibe:

use NetSDS::Util::Types;

# Check if variable contains integer value
if (is_int($var)) {
    $var++;
} else {
    print "Value is not integer!";
}

πŸ¦‹ DESCRIPTION πŸ¦‹

the NetSDS::Util::Types module is just... a whole collection of functions that check whether your data is actually the data type you think it is. it's giving vibe check but for variables ✨ she contains functions for checking data for being of exact data types, periodt.


πŸŽ€ EXPORTED FUNCTIONS πŸŽ€

  • is_int($var) β€” check if parameter is integer. yes queen, she checks if the given parameter is an integer πŸ’–
  • is_float([...]) β€” check if parameter is float number. that's it, that's the function, she checks if given parameter is a float number ✨
  • is_date([...]) β€” check if parameter is date string. returns 1 if parameter is a date string πŸ—“οΈ
  • is_binary([...]) β€” check for binary content. returns 1 if parameter is non text πŸ’€
  • is_ref_scalar($ref) β€” check if reference to scalar value. returns true if parameter is a scalar reference πŸͺž

like for example, bestie:

my $var = 'Scalar string';
if (is_ref_scalar(\$var)) {
    print "It's scalar value";
}
  • is_ref_array($ref) β€” check if reference to array. returns true if parameter is an array reference 🌈
  • is_ref_hash($ref) β€” check if hashref. returns true if parameter is a hash reference πŸ“
  • is_ref_code($ref) β€” check if code reference. returns true if parameter is a code reference πŸ‘‘
  • is_ref_obj($ref, [$class_name]) β€” check if blessed object. returns true if parameter is an object 🧚

⭐ EXAMPLES ⭐

None β€” yeah bestie, there's literally nothing here, the examples section is empty and honestly? she's serving minimalist πŸ™ˆ


πŸ’€ BUGS πŸ’€

None β€” no bugs, we're unbothered, moisturized, happy, in our lane, focused, flourishing 🌸


πŸ”₯ TODO πŸ”₯

Add more functions. that's the whole list. the main character energy of just one task, we love a girl with a plan πŸ’…


🌈 SEE ALSO 🌈

None. β€” nothing to see here, moving on ✨


πŸ‘‘ AUTHORS πŸ‘‘

  • Valentyn Solomko <pere@pere.org.ua>
  • Michael Bochkaryov <misha@rattler.kiev.ua>

shoutout to the icons who made this happen 🫢


and that's the page bestie!! this one was perl v5.36.0, dated 2022-11-20, from the NetSDS...::Types(3pm) page β€” go forth and type check your little heart out πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from