Since filehandles are typeglobs, you can access its associated hash and stick stuff in it. For example,
sub set_foo { my $self = shift; my $val = shift; ${ *$self }{foo} = $val; }
Update: I think you can also just say *$self->{foo} = $val; which is less ugly.
In reply to Re: Adding properties to a blessed file handle reference
by friedo
in thread Adding properties to a blessed file handle reference
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |