mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
755f1591fb
Provides the opposite of the 'tied' function. Say you have %hash that is tied to $object. Then, it is relatively simple to get $object from %hash simply by saying $object = tied %hash; But, how does one go the other way? Simple, with Tie::Restore tie %hash, 'Tie::Restore', $object; Works for any kind of tie. (scalar, array, hash, filehandle)
14 lines
413 B
Plaintext
14 lines
413 B
Plaintext
Provides the opposite of the 'tied' function. Say you have %hash that
|
|
is tied to $object. Then, it is relatively simple to get $object from
|
|
%hash simply by saying
|
|
|
|
$object = tied %hash;
|
|
|
|
But, how does one go the other way? Simple, with Tie::Restore
|
|
|
|
tie %hash, 'Tie::Restore', $object;
|
|
|
|
Works for any kind of tie. (scalar, array, hash, filehandle)
|
|
|
|
WWW: http://search.cpan.org/dist/Tie-Restore/
|