Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to tie variables to objects (roll)

by tye (Sage)
on Jul 30, 2004 at 17:22 UTC ( #378756=note: print w/replies, xml ) Need Help??


in reply to How to tie variables to objects

It is the way it is. That was how the author of the 'tie' feature conceived of it being used.

(for the third time) It isn't hard to tie to an existing object. For example:

package MyClass; #... sub TieArray { my( $me, $av )= @_; tie @$av, ref($me), $me; } sub Class::TIEARRAY { return $_[1]; } package main; my $obj= MyClass->new( ... ); my @array; $obj->TieArray(\@array);

Untested and just One Way To Do It.

- tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://378756]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2023-09-22 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?