Chemis...:Dumper(3pm)
π Chemis...:Dumper(3pm) π
okay bestie, so this is a page from the User Contributed Perl Documentation (the vibes are immaculate, the manpage name is literally Chemis...:Dumper(3pm), don't ask about the ellipsis, it's just how the terminal truncates it β¨). Sit down, hydrate, and let's get into it.
πΈ NAME πΈ
Chemistry::File::Dumper β read and write molecules via Data::Dumper. that's it, that's the whole job description, and it does it flawlessly π
β¨ SYNOPSIS β¨
here's the whole thing in action, no cap:
use Chemistry::File::Dumper;
my $mol = Chemistry::Mol->read("mol.pl");
print $mol->print(format => dumper);
$mol->write("mol.pl", format => "dumper");
look at that. read a mol, print a mol, write a mol. it's giving effortless. it's giving main character energy π«Ά
π¦ DESCRIPTION π¦
so basically, this module takes the Data::Dumper Perl core module and hooks it up to the Chemistry::File API, which means you can dump and undump Chemistry::Mol objects easily. easy is the keyword here. lowkey the easiest thing you'll do all day.
and the way it just automatically registers the "dumper" format with Chemistry::Mol? obsessed. no setup, no ceremony, it just shows up and slays π
for the automatic file type guessing situation, this module assumes that dumped files end in ".pl". that's the tell. iykyk.
ngl, this one is mostly a debugging tool β it dumps all the information available in an object, in a reproducible way, so you can use it to compare molecule objects. reproducible output is such a flex, highkey β¨
β οΈ okay but real talk for a second: it would not be a good idea to use this to read untrusted files, because they may contain arbitrary Perl code. like, that's a whole entire "we do not do that here" situation. do not let strangers hand you a .pl file, bestie, that's how you get got π
π OPTIONS π
these are the options you can use when writing a molecule, whether you're writing it as a file or as a string. same options either way, very democratic of it.
dumper_indentβ the value you hand over toData::Dumper::Indent. Default is1. yes, it's one, one is the vibe.dumper_purityβ the value you hand over toData::Dumper::Purity. Default is1. same energy, also one.
and for reading? there are no special options for reading. none. zero. that's the whole tea β
π SOURCE CODE REPOSITORY π
https://github.com/perlmol/Chemistry-Mol
go look at the source, it's right there, it's beautiful, it's iconic β
π SEE ALSO π
Chemistry::MolChemistry::FileData::Dumper
the whole squad, fr fr π«Ά
π AUTHOR π
Ivan Tubert-Brohman <itub@cpan.org>
π§ COPYRIGHT π§
Copyright (c) 2005 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay and that's the page!! this was perl v5.40.1, dated 2025-10-13, and the manual name at the bottom is Chemis...:Dumper(3pm) just like at the top, because symmetry is a serve π
β¨ mwah, go dump some molecules, you've got this π
π¦ where this page comes from
- ubuntu resolute: libchemistry-mol-perl 0.40-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libchemistry-mol-perl 0.40-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