HTML::...Number(3pm)

πŸ“¦
version 2.07000 Β· 5 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– NAME πŸ’–

HTML::FormFu::Filter::FormatNumber β€” bestie, this lil filter turns a formatted number from a locale you already know back into something raw πŸ”’βœ¨


🌸 VERSION 🌸

It's giving version 2.07 πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so literally, this filter does the exact opposite of HTML::FormFu::Deflator::FormatNumber. It strips out all the thousands separators and the decimal points and hands you back the raw number, like, a number perl can actually deal with. If you want more deets, go look at "unformat_number" in Number::Format 🫢

locale: de_DE
elements:
  - type: Text
    name: number
    filters:
      - type: FormatNumber

# An input value like "13.233.444,22" will be transformed to "13233444.22"
# Same for "13233444,22"

Like, 13.233.444,22 goes in and 13233444.22 comes out. Same energy for 13233444,22 πŸ’€ no cap.


✨ METHODS ✨

πŸŽ€ locale

If there's no locale found anywhere, then it just uses the server's locale. Feral but okay πŸ™ˆ

This method is a special 'inherited accessor', which basically means you can set it on the form, on an enclosing block element, on the field, or on this filter itself. When someone reads the value and nothing's been defined, it just automatically climbs the element's hierarchy of parents β€” through any block elements, all the way up to the form β€” hunting for a defined value. Main character behavior honestly πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Moritz Onken, onken at houseofdesign.de πŸ’Œ


🌈 SEE ALSO 🌈

  • It's a sub-class of, and inherits methods from HTML::FormFu::Filter
  • HTML::FormFu::Deflator::FormatNumber
  • HTML::FormFu

Copyright 2008 Moritz Onken, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


πŸ“ AUTHOR πŸ“

Carl Franks <cpan@fireartist.com>


This software is copyright (c) 2018 by Carl Franks.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


And that's the whole page bestie 🫢 this was perl v5.28.1, dated 2019-01-12, and yes the man page was literally named HTML::...Number(3pm) because someone was feeling mysterious. Slay, go format some numbers πŸ’…βœ¨

πŸ“¦ where this page comes from