Boulder::String(3pm)
π Boulder::String π
okay bestie, so this is Boulder::String, a lil Perl module from the User Contributed Perl Documentation collection, and it is literally the moment you've been waiting for if you've ever been like "bestie I have a string and I need tag/value data in it and I do not want to deal with files." π
β¨ NAME β¨
Boulder::String β Read and write tag/value data from a string.
like. that's it. that's the whole vibe. a string. tag/value. in and out. periodt. π
π SYNOPSIS π
here's the lil starter pack, copied exactly because code is sacred and we do not touch it:
#!/bin/perl
# Read a B<Stone> from stdin and create a string that can be
# passed to a dumb sub, which doesn't know about Stones.
use Boulder::Stream;
use Boulder::String;
my $stream = Boulder::Stream->newFh;
# read a stone from stdin
my $record = <$stream> );
print $stream $record;
}
ngl the synopsis is a little chaotic but we're respecting the source material π the energy is there and that's what matters.
π¦ DESCRIPTION π¦
so Boulder::String gives you access to Boulder IO hierarchical tag/value data. that's the whole job, and it eats. π₯
the tea is: Stone objects that get printed to the tied string are appended to the string in Boulder format. so you're not overwriting, you're stacking. main character energy fr fr.
π Boulder::Stream METHODS π
ik the heading says Stream, that's just how the original rolls, we keep it. these are the methods, both of them, no crumbs left behind π«Ά
$stream = Boulder::Stream->new($in_string,\$out_string);β this is the constructor, bestie.new()creates a brand newBoulder::Stringobject. you must hand it two things: an input string and a reference to an output string. and here's the cute part β the input string may be empty, so don't stress if you've got nothing to feed it yet. β¨$stream->write_record($stone)β takes the stone you pass in and writes it into$out_string, formatted as Boulder IO. that's the move. write it, and it's there. π
π AUTHOR π
Lincoln D. Stein <lstein@cshl.org>, Cold Spring Harbor Laboratory, Cold Spring Harbor, NY. and the licensing tea: this module can be used and distributed on the same terms as Perl itself. slay.
Patches and bug fixes contributed by Bernhard Schmalhofer <bernhard@biomax.de>. thank you for your service π«‘π
π SEE ALSO π
the whole friend group, go say hi:
BoulderBoulder::StreamBoulder::BlastBoulder::GenbankBoulder::MedlineBoulder::UnigeneBoulder::OmimBoulder::SwissProt
real talk though: the synopsis up there is genuinely a little cursed, so if you're copy-pasting it and Perl starts yelling, that's not you, that's the docs. π
and that's the page, bestie! this one shipped as part of perl v5.34.0, dated 2022-06-08, and it will forever be Boulder::String(3pm) in our hearts. go read some strings. mwah ππβ¨
π¦ where this page comes from
- debian bookworm: libboulder-perl 1.30-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libboulder-perl 1.30-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libboulder-perl 1.30-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libboulder-perl 1.30-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libboulder-perl 1.30-6 Β· 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