in reply to Re: Re: Object::MultiType - Perl Objects as Hash, Array & Scalar in the same time!
in thread Object::MultiType - Perl Objects as Hash, Array & Scalar in the same time!
As I recall, you can't handle globs this way and expect to get unique ones. As I recall localizing a symbol table entry and returning a reference will cause multiple uses to merge into a single shared instance. You still need to use gemsym() or my lexglob() for handling that $this->{g} instance.
sub new { my $class = shift ; local(*NULL); my $this = { s => \'' , a => [] , h => [] , c => sub{} , g => \*NULL , } ; bless($this,$class); return( $this ) ; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Object::MultiType - Perl Objects as Hash, Array & Scalar in the same time!
by gmpassos (Priest) on May 12, 2003 at 18:44 UTC |