Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Accessing hash in blessed object

by blue_cowdawg (Monsignor)
on Oct 13, 2014 at 18:23 UTC ( [id://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: http://blog.berghold.net Warning: No political correctness allowed.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-03-29 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found