Test::S...rialise(3)
π NAME π
Test::Smoke::Util::Serialise β bestie, it serialises (aka stringifies) values, a lil bit like Data::Dumper does. No cap. π
β¨ SYNOPSIS β¨
use Test::Smoke::Util::Serialise 'serialise';
my $value = [ qw( one two three ) ];
printf "Looks like: '%s'\n", serialise($value);
# Looks like: '[one, two, three]'\n
π¦ DESCRIPTION π¦
Okay so picture Data::Dumper::Dumper, right? It mostly looks exactly like that, except with $Indent = 0, $Sortkeys = 1 and $Terse = 1. That's the vibe. π
πΈ serialise($to_serialise)
It makes a string representation of the argument you hand it. That's it, that's the whole job. π
Arrays get wrapped up in square brackets. Simple. Iconic.
Hashes get wrapped up in curly braces, and listen β every single Key-Value-pair inside gets its own enclosing parenthesis with a => (fat comma, you know her) in-between. So it's giving:
{(one => two), (three => [four, five]), (six => {(seven => eight)}, (nine => \ten))}
π Arguments
Positional:
$to_serialise
π Responses
A string representation of the value passed. That's what you get back. Periodt. π«Ά
π COPYRIGHT π
(c) 2020, Abe Timmerman <abeltje@cpan.org> All rights reserved.
With contributions from Jarkko Hietaniemi, Merijn Brand, Campo Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, Rich Rauenzahn, David Cantrell. Look at that lineup, literal legends, we stan. π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See:
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Bestie I'm so serious, no promises, she's out here doing her best with zero guarantees. π
Okay that's the whole page, mwah π β brought to you by perl v5.42.0, dated 2025-07-25, and yes this is Test::S...rialise(3), go forth and serialise responsibly. π§β¨
π¦ where this page comes from
- fedora 43: perl-Test-Smoke 1.84-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms