BSON::String(3pm)

πŸ“¦
version 1.12.2 Β· 5 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– BSON::String β€” the perl manpage but make it cute

okay so this is BSON::String, from the perl manual pages (section 3pm), and bestie it's literally the BSON type wrapper for strings. that's the whole vibe. let's get into it πŸ’…


✨ NAME ✨

BSON::String β€” BSON type wrapper for strings πŸŽ€


🌸 VERSION 🌸

this is version v1.12.2. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole thing, copy it exactly bestie:

use BSON::Types ':all';

bson_string( $string );

that's it. that's the move. ✨


πŸ’œ DESCRIPTION πŸ’œ

so this module gives you a BSON type wrapper for a string value. iconic behaviour, honestly.

and here's why it exists β€” because Perl does not distinguish between numbers and strings (yeah, she's like that 😭), this module provides an explicit string type for a scalar value. so when you need something to be a string fr fr, this is how you say it out loud.


πŸŽ€ ATTRIBUTES πŸŽ€

value

A scalar value, which will be stringified during construction. the default is the empty string. so if you don't pass anything, you get '' β€” quiet, humble, minimal. we love her. 🫢


🌈 METHODS 🌈

TO_JSON

Returns value as a string. that's it. that's the method. she serves. πŸ’…


πŸ‘‘ OVERLOADING πŸ‘‘

okay so the stringification operator ("") is overloaded to return the value. and that's not all β€” the full "minimal set" of overloaded operations is provided (per the overload documentation, iykyk), and fallback overloading is enabled. so she's flexible. she adapts. main character energy fr. ⭐


πŸ’– AUTHORS πŸ’–

the legends behind this:

  • David Golden <david@mongodb.com> πŸ‘‘
  • Stefan G. <minimalist@lavabit.com> 🌸

This software is Copyright (c) 2020 by Stefan G. and MongoDB, Inc.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004
so like, use it, remix it, ship it β€” just respect the license bestie, it's giving legal πŸ’€

and that's the whole page!! this was BSON::String from perl v5.30.3, dated 2020-08-14, part of the User Contributed Perl Documentation. go forth and stringify responsibly, mwah πŸ’‹βœ¨πŸ¦‹

πŸ“¦ where this page comes from