{
    "content": [
        {
            "type": "text",
            "text": "# URI::QueryParam (perldoc)\n\n## NAME\n\nURI::QueryParam - Additional query methods for URIs\n\n## SYNOPSIS\n\nuse URI;\nuse URI::QueryParam;\n$u = URI->new(\"\", \"http\");\n$u->queryparam(foo => 1, 2, 3);\nprint $u->query;    # prints foo=1&foo=2&foo=3\nfor my $key ($u->queryparam) {\nprint \"$key: \", join(\", \", $u->queryparam($key)), \"\\n\";\n}\n\n## DESCRIPTION\n\nLoading the \"URI::QueryParam\" module adds some extra methods to URIs that support query methods.\nThese methods provide an alternative interface to the $u->queryform data.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SEE ALSO**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "URI::QueryParam",
        "section": "",
        "mode": "perldoc",
        "summary": "URI::QueryParam - Additional query methods for URIs",
        "synopsis": "use URI;\nuse URI::QueryParam;\n$u = URI->new(\"\", \"http\");\n$u->queryparam(foo => 1, 2, 3);\nprint $u->query;    # prints foo=1&foo=2&foo=3\nfor my $key ($u->queryparam) {\nprint \"$key: \", join(\", \", $u->queryparam($key)), \"\\n\";\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 65,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "URI::QueryParam - Additional query methods for URIs\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use URI;\nuse URI::QueryParam;\n\n$u = URI->new(\"\", \"http\");\n$u->queryparam(foo => 1, 2, 3);\nprint $u->query;    # prints foo=1&foo=2&foo=3\n\nfor my $key ($u->queryparam) {\nprint \"$key: \", join(\", \", $u->queryparam($key)), \"\\n\";\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Loading the \"URI::QueryParam\" module adds some extra methods to URIs that support query methods.\nThese methods provide an alternative interface to the $u->queryform data.\n\nThe queryparam* methods have deliberately been made identical to the interface of the\ncorresponding \"CGI.pm\" methods.\n\nThe following additional methods are made available:\n\n@keys = $u->queryparam\n@values = $u->queryparam( $key )\n$firstvalue = $u->queryparam( $key )\n$u->queryparam( $key, $value,... )\nIf $u->queryparam is called with no arguments, it returns all the distinct parameter keys\nof the URI. In a scalar context it returns the number of distinct keys.\n\nWhen a $key argument is given, the method returns the parameter values with the given key.\nIn a scalar context, only the first parameter value is returned.\n\nIf additional arguments are given, they are used to update successive parameters with the\ngiven key. If any of the values provided are array references, then the array is\ndereferenced to get the actual values.\n\nPlease note that you can supply multiple values to this method, but you cannot supply\nmultiple keys.\n\nDo this:\n\n$uri->queryparam( widgetid => 1, 5, 9 );\n\nDo NOT do this:\n\n$uri->queryparam( widgetid => 1, frobnicatorid => 99 );\n\n$u->queryparamappend($key, $value,...)\nAdds new parameters with the given key without touching any old parameters with the same\nkey. It can be explained as a more efficient version of:\n\n$u->queryparam($key,\n$u->queryparam($key),\n$value,...);\n\nOne difference is that this expression would return the old values of $key, whereas the\nqueryparamappend() method does not.\n\n@values = $u->queryparamdelete($key)\n$firstvalue = $u->queryparamdelete($key)\nDeletes all key/value pairs with the given key. The old values are returned. In a scalar\ncontext, only the first value is returned.\n\nUsing the queryparamdelete() method is slightly more efficient than the equivalent:\n\n$u->queryparam($key, []);\n\n$hashref = $u->queryformhash\n$u->queryformhash( \\%newform )\nReturns a reference to a hash that represents the query form's key/value pairs. If a key\noccurs multiple times, then the hash value becomes an array reference.\n\nNote that sequence information is lost. This means that:\n\n$u->queryformhash($u->queryformhash);\n\nis not necessarily a no-op, as it may reorder the key/value pairs. The values returned by\nthe queryparam() method should stay the same though.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "URI, CGI\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2002 Gisle Aas.\n",
                "subsections": []
            }
        }
    }
}