I'm a bit puzzled about what you are doing here, but let me throw this out there and maybe it'll help:
package MyThreadSpool;
use Carp;
use threads;
sub new {
shift;
croak "Port number required" unless(@_);
my $port :shared = shift;
my %buffer :shared;
my $self = {
port => $port,
buffer => \%buffer
}
bless $self,"MyThreadSpool";
return $self
}
and in some code coming to a workstation/laptop near you:
#!/usr/bin/perl -w
use strict;
use MyThreadSpool;
my $obj = MyThreadSpool->new(8080,my %buffer);
# and so now
print $obj->{port}.... etc etc etc
Is this something approximating what you are trying to do?
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net;
Blog: http://blog.berghold.net Warning: No political correctness allowed.