in reply to Re: Passing self to process as reference
in thread Passing self to process as reference
This gives the error -#!/usr/bin/perl use strict; use warnings; use MyStuff::Server; my $serverPort = '17077'; my %serverDictionary; $serverDictionary{"barry"} = new MyStuff::Server("barry","localhost",1 +7070); sleep(10); # and my package - # Represents a video server package MyStuff::Server; use strict; use warnings; use Thread; sub new { my $class = shift; my $self = { name => shift, }; bless $self, $class; my @paramters = ($self); my $thread = new Thread \&processJobs, \@paramters; return $self; } sub processJobs { my $self = shift; print "Processing Jobs for Server Named: ", $self->{name},"\n"; }
Line 43 is where I print. Thanks again!Pseudo-hashes are deprecated at line 43. Argument "barry" isn't numeric in hash element at line 43.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Passing self to process as reference
by ELISHEVA (Prior) on Mar 18, 2009 at 11:15 UTC | |
by Anonymous Monk on Mar 18, 2009 at 11:26 UTC | |
by ELISHEVA (Prior) on Mar 18, 2009 at 11:58 UTC | |
by Anonymous Monk on Mar 18, 2009 at 11:48 UTC |