Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Accessing hash in blessed object

by blue_cowdawg (Monsignor)
on Oct 13, 2014 at 18:23 UTC ( #1103660=note: print w/replies, xml ) Need Help??

in reply to Accessing hash in blessed object

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: Warning: No political correctness allowed.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1103660]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2023-03-30 05:53 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (73 votes). Check out past polls.