{
    "mode": "perldoc",
    "parameter": "Template::Plugin::Math",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Template%3A%3APlugin%3A%3AMath/json",
    "generated": "2026-10-06T17:09:41Z",
    "synopsis": "[% USE Math %]\n[% Math.sqrt(9) %]",
    "sections": {
        "NAME": {
            "content": "Template::Plugin::Math - Plugin providing mathematical functions\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "[% USE Math %]\n\n[% Math.sqrt(9) %]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The Math plugin provides numerous mathematical functions for use within templates.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "\"Template::Plugin::Math\" makes available the following functions from the Perl core:\n\nabs\natan2\ncos\nexp\nhex\nint\nlog\noct\nrand\nsin\nsqrt\nsrand\n\nIn addition, if the Math::Trig module can be loaded, the following functions are also available:\n\npi\ntan\ncsc\ncosec\nsec\ncot\ncotan\nasin\nacos\natan\nacsc\nacosec\nasec\nacot\nacotan\nsinh\ncosh\ntanh\ncsch\ncosech\nsech\ncoth\ncotanh\nasinh\nacosh\natanh\nacsch\nacosech\nasech\nacoth\nacotanh\nrad2deg\nrad2grad\ndeg2rad\ndeg2grad\ngrad2rad\ngrad2deg\n\nIf the Math::TrulyRandom module is available, and you've got the time to wait, the\n\"trulyrandomnumber\" method is available:\n\n[% Math.trulyrandomnumber %]\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Andy Wardley <abw@wardley.org> <http://wardley.org/>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved.\n\nThis module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Template::Plugin\n",
            "subsections": []
        }
    },
    "summary": "Template::Plugin::Math - Plugin providing mathematical functions",
    "flags": [],
    "examples": [],
    "see_also": []
}