As I said in CB. I have found another way to save the different data types without GLOB! ;-P
Now I'm using just a anonymous hash blessed. I have created a package for a Saver object of the data, where you have $saver->hash and $saver->set_hash...
How you made the Lexical::Typeglob? It works for multiple objects? I say that because I was trying to use local(*FOO), but doesn't work when you have more than 1 object!
Update: I have extended the multi type for CODE and GLOB, soo you can make:
my $multi = Object::MultiType->new( code => sub{ print "CODE!\n" } , glob => \*STDOUT , ) ; &$multi(args) print $multi "Hello!" ;
Graciliano M. P.
"The creativity is the expression of the liberty".
In reply to Re: Re: Re: Re: Object::MultiType - Perl Objects as Hash, Array & Scalar in the same time!
by gmpassos
in thread Object::MultiType - Perl Objects as Hash, Array & Scalar in the same time!
by gmpassos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |