{
    "mode": "perldoc",
    "parameter": "Tie::ToObject",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Tie%3A%3AToObject/json",
    "generated": "2026-06-13T11:59:41Z",
    "synopsis": "use Tie::ToObject;\nmy $stolen = tied(%something);\ntie %somethingelse, 'Tie::ToObject', $stolen;",
    "sections": {
        "NAME": {
            "content": "Tie::ToObject - Tie to an existing object.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Tie::ToObject;\n\nmy $stolen = tied(%something);\n\ntie %somethingelse, 'Tie::ToObject', $stolen;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "While \"tie\" in perldoc allows tying to an arbitrary object, the class in question must support\nthis in it's implementation of \"TIEHASH\", \"TIEARRAY\" or whatever.\n\nThis class provides a very tie constructor that simply returns the object it was given as it's\nfirst argument.\n\nThis way side effects of calling \"$object->TIEHASH\" are avoided.\n\nThis is used in Data::Visitor in order to tie a variable to an already existing object. This is\nalso useful for cloning, when you want to clone the internal state object instead of going\nthrough the tie interface for that variable.\n",
            "subsections": []
        },
        "VERSION CONTROL": {
            "content": "This module is maintained using Darcs. You can get the latest version from\n<http://nothingmuch.woobling.org/code>, and use \"darcs send\" to commit changes.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Yuval Kogman <nothingmuch@woobling.org>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (c) 2008 Yuval Kogman. All rights reserved\nThis program is free software; you can redistribute\nit and/or modify it under the same terms as Perl itself.\n",
            "subsections": []
        }
    },
    "summary": "Tie::ToObject - Tie to an existing object.",
    "flags": [],
    "examples": [],
    "see_also": []
}