The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Oryx::Value::Float - Values containing floating-point data

SYNOPSIS

  package CMS::LedgerEntry;

  use base qw( Oryx::Class );

  our $schema = {
      attributes => [ {
          name => 'summary',
          type => 'String',
      }, {
          name => 'amount',
          type => 'Float',
      } ],
  };

  $x = CMS::Picture->create({
      summary => 'New PDA',
      amount  => 342.17,
  });

DESCRIPTION

This value stores floating-point data. It has an optional field called "precision" that can be used to set how many decimal places should be stored in the database.

This value type is checked to see that it is in fact a decimal number and is stored with the "Float" primitive type.

SEE ALSO

Oryx::Value

AUTHOR

Richard Hundt <richard NO SPAM AT protea-systems.com>

COPYRIGHT AND LICENSE

This library is free software and may be used under the same terms as Perl itself.