Chemis...:Dumper(3pm)

πŸ“¦
version 0.40 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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 to Data::Dumper::Indent. Default is 1. yes, it's one, one is the vibe.
  • dumper_purity β€” the value you hand over to Data::Dumper::Purity. Default is 1. 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::Mol
  • Chemistry::File
  • Data::Dumper

the whole squad, fr fr 🫢


πŸ“ AUTHOR πŸ“

Ivan Tubert-Brohman <itub@cpan.org>


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