IO::File and shared

[email protected] ((David Shapiro))
Newsgroups perl.ithreads
Organization PerlDiscuss.com
Message-ID <[email protected]>
Can anybody help me to understand how I can assign an IO::File handle to
this hash with share previously in the sub new for $self as:

sub new {
   my $self = &share({});
   bless $self,ref($class)||$class;
   return $self;
}
.
.
.
sub init() {
   my $self = shift;
   $self->{fh} = IO::File->new($self->{file},$self->{mode},$self->  
{permissions}) or die "Failed to open $self->{file}: $!\n";
}

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.