Ivan Tubert-Brohman > Chemistry-Mol-0.26 > Chemistry::File::Dumper

Download:
Chemistry-Mol-0.26.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  2
View Bugs
Report a bug
Module Version: 0.26   Source   Latest Release: Chemistry-Mol-0.37

NAME ^

Chemistry::File::Dumper - Read and write molecule via Data::Dumper

SYNOPSIS ^

    use Chemistry::File::Dumper;

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

DESCRIPTION ^

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 purpuses 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.

VERSION ^

0.26

SEE ALSO ^

Chemistry::Mol, Chemistry::File, Data::Dumper

AUTHOR ^

Ivan Tubert-Brohman <itub@cpan.org>