Catmandu::Fix::int(3pm)

Catmandu::Fix::int3pm

Convert a value to an integer

Usage

    # year => "2016"
    int(year)
    # year => 2016
    # foo => "bar-123baz"
    int(foo)
    # foo => -123
    # foo => ""
    int(foo)
    # foo => 0
    # foo => "abc"
    int(foo)
    # foo => 0
    # foo => []
    int(foo)
    # foo => 0
    # foo => ["a", "b", "c"]
    int(foo)
    # foo => 3
    # foo => {a => "b", c => "d"}
    int(foo)
    # foo => 2

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

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