{
    "content": [
        {
            "type": "text",
            "text": "# Moose::Meta::Attribute::Native::Trait::Counter (info)\n\n## NAME\n\nMoose::Meta::Attribute::Native::Trait::Counter - Helper trait for Int attributes which represent counters\n\n## SYNOPSIS\n\npackage MyHomePage;\nuse Moose;\nhas 'counter' => (\ntraits  => ['Counter'],\nis      => 'ro',\nisa     => 'Num',\ndefault => 0,\nhandles => {\ninccounter   => 'inc',\ndeccounter   => 'dec',\nresetcounter => 'reset',\n},\n);\nmy $page = MyHomePage->new();\n$page->inccounter;    # same as $page->counter( $page->counter + 1 );\n$page->deccounter;    # same as $page->counter( $page->counter - 1 );\nmy $countbytwos = 2;\n$page->inccounter($countbytwos);\n\n## DESCRIPTION\n\nThis trait provides native delegation methods for counters. A counter\ncan be any sort of number (integer or not). The delegation methods\nallow you to increment, decrement, or reset the value.\n\n## Sections\n\n- **Moose::Meta::AttributeUsertMoose::Meta::Attribute::Native::Trait::Counter(3pm)**\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **DEFAULT TYPE**\n- **PROVIDED METHODS**\n- **BUGS**\n- **AUTHORS**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Moose::Meta::Attribute::Native::Trait::Counter",
        "section": "",
        "mode": "info",
        "summary": "Moose::Meta::Attribute::Native::Trait::Counter - Helper trait for Int attributes which represent counters",
        "synopsis": "package MyHomePage;\nuse Moose;\nhas 'counter' => (\ntraits  => ['Counter'],\nis      => 'ro',\nisa     => 'Num',\ndefault => 0,\nhandles => {\ninccounter   => 'inc',\ndeccounter   => 'dec',\nresetcounter => 'reset',\n},\n);\nmy $page = MyHomePage->new();\n$page->inccounter;    # same as $page->counter( $page->counter + 1 );\n$page->deccounter;    # same as $page->counter( $page->counter - 1 );\nmy $countbytwos = 2;\n$page->inccounter($countbytwos);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Moose::Meta::AttributeUsertMoose::Meta::Attribute::Native::Trait::Counter(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DEFAULT TYPE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "PROVIDED METHODS",
                "lines": 29,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "Moose::Meta::AttributeUsertMoose::Meta::Attribute::Native::Trait::Counter(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Moose::Meta::Attribute::Native::Trait::Counter - Helper trait for Int\nattributes which represent counters\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 2.2200\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "package MyHomePage;\nuse Moose;\n\nhas 'counter' => (\ntraits  => ['Counter'],\nis      => 'ro',\nisa     => 'Num',\ndefault => 0,\nhandles => {\ninccounter   => 'inc',\ndeccounter   => 'dec',\nresetcounter => 'reset',\n},\n);\n\nmy $page = MyHomePage->new();\n$page->inccounter;    # same as $page->counter( $page->counter + 1 );\n$page->deccounter;    # same as $page->counter( $page->counter - 1 );\n\nmy $countbytwos = 2;\n$page->inccounter($countbytwos);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This trait provides native delegation methods for counters. A counter\ncan be any sort of number (integer or not). The delegation methods\nallow you to increment, decrement, or reset the value.\n",
                "subsections": []
            },
            "DEFAULT TYPE": {
                "content": "If you don't provide an \"isa\" value for your attribute, it will default\nto \"Num\".\n",
                "subsections": []
            },
            "PROVIDED METHODS": {
                "content": "o   set($value)\n\nSets the counter to the specified value and returns the new value.\n\nThis method requires a single argument.\n\no   inc\n\no   inc($arg)\n\nIncreases the attribute value by the amount of the argument, or by\n1 if no argument is given. This method returns the new value.\n\nThis method accepts a single argument.\n\no   dec\n\no   dec($arg)\n\nDecreases the attribute value by the amount of the argument, or by\n1 if no argument is given. This method returns the new value.\n\nThis method accepts a single argument.\n\no   reset\n\nResets the value stored in this slot to its default value, and\nreturns the new value.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "See \"BUGS\" in Moose for details on reporting bugs.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "o   Stevan Little <stevan@cpan.org>\n\no   Dave Rolsky <autarch@urth.org>\n\no   Jesse Luehrs <doy@cpan.org>\n\no   Shawn M Moore <sartak@cpan.org>\n\no    ' (Yuval Kogman) <nothingmuch@woobling.org>\n\no   Karen Etheridge <ether@cpan.org>\n\no   Florian Ragwitz <rafl@debian.org>\n\no   Hans Dieter Pearcey <hdp@cpan.org>\n\no   Chris Prather <chris@prather.org>\n\no   Matt S Trout <mstrout@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is copyright (c) 2006 by Infinity Interactive, Inc.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n\nperl v5.34.0               Moose::Meta::Attribute::Native::Trait::Counter(3pm)",
                "subsections": []
            }
        }
    }
}