1Tie::ToObject(3)      User Contributed Perl Documentation     Tie::ToObject(3)
2
3
4

NAME

6       Tie::ToObject - Tie to an existing object.
7

SYNOPSIS

9               use Tie::ToObject;
10
11               my $stolen = tied(%something);
12
13               tie %something_else, 'Tie::ToObject', $stolen;
14

DESCRIPTION

16       While "tie" in perldoc allows tying to an arbitrary object, the class
17       in question must support this in it's implementation of "TIEHASH",
18       "TIEARRAY" or whatever.
19
20       This class provides a very tie constructor that simply returns the
21       object it was given as it's first argument.
22
23       This way side effects of calling "$object->TIEHASH" are avoided.
24
25       This is used in Data::Visitor in order to tie a variable to an already
26       existing object. This is also useful for cloning, when you want to
27       clone the internal state object instead of going through the tie
28       interface for that variable.
29

VERSION CONTROL

31       This module is maintained using Darcs. You can get the latest version
32       from <http://nothingmuch.woobling.org/code>, and use "darcs send" to
33       commit changes.
34

AUTHOR

36       Yuval Kogman <nothingmuch@woobling.org>
37
39               Copyright (c) 2008 Yuval Kogman. All rights reserved
40               This program is free software; you can redistribute
41               it and/or modify it under the same terms as Perl itself.
42
43
44
45perl v5.32.0                      2020-07-28                  Tie::ToObject(3)
Impressum