The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Math::Formula::Config - load/save formulas to file

INHERITANCE

 Math::Formula::Config is extended by
   Math::Formula::Config::INI
   Math::Formula::Config::JSON
   Math::Formula::Config::YAML

SYNOPSIS

  my $saver = Math::Formula::Config::YAML->new(directory => $dir);
  $saver->save($context);

DESCRIPTION

The extensions of this module can be used to export and import sets of expressions to and from a program.

The following serialization formats are supported:

METHODS

Constructors

Math::Formula::Config->new(%options)
 -Option   --Default
  directory  <required>
directory => DIRECTORY

In this directory, the output files will be made. For each context (fragment), a separate file is made.

Attributes

$obj->directory()

When the configuration files will be written, and are read.

$obj->path_for($file)

Constructs a filename, based on the configured directory(), the context's name, and the usual filename extensions.

Actions

$obj->load($name, %options)

Load a Math::Formula::Context for an INI file.

 -Option  --Default
  filename  <directory/$name.ini>
filename => FILENAME
$obj->save($context, %args)

Serialize the $context into a file as storage or to be edited by hand. This is a useful method when default configuration templates need to be generated.

SEE ALSO

This module is part of Math-Formula distribution version 0.16, built on March 14, 2023. Website: http://perl.overmeer.net/CPAN/

LICENSE

Copyrights 2023 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/