Chemistry::File::Dumper(3pm)

Chemistry::File::Dumper3pm

Read and write molecules via data::dumper

Usage

    use Chemistry::File::Dumper;
    my $mol = Chemistry::Mol->read("mol.pl");
    print $mol->print(format => dumper);
    $mol->write("mol.pl", format => "dumper");

Overview

This module hooks the Data::Dumper Perl core module to the Chemistry::File API, allowing you to dump and undump Chemistry::Mol objects easily. This module automatically registers the "dumper" format with Chemistry::Mol.

For purposes of automatic file type guessing, this module assumes that dumped files end in ".pl".

This module is useful mainly for debugging purposes, as it dumps all the information available in an object, in a reproducible way (so you can use it to compare molecule objects). However, it wouldn't be a good idea to use it to read untrusted files, because they may contain arbitrary Perl code.

Options

The following options can be used when writing a molecule either as a file or as a string.

dumper_indent

Value to give to Data::Dumper::Indent. Default is 1.

dumper_purity

Value to give to Data::Dumper::Purity. Default is 1.

There are no special options for reading.

Source code repository

<https://github.com/perlmol/Chemistry-Mol>

Releases

Unchanged in 2 releases since Debian 12 (Bookworm).

  1. 12–13

Author

Ivan Tubert-Brohman <[email protected]>

From libchemistry-mol-perl 0.39-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.