Please clip text or not top-post [Was RE: Look At This Package]

2003-10-01 Thread Kevin Pfeiffer
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: It did complain or else I would have sent a thank you for making it work already ;) [long, upside clipped] Please at least clip the old text if you are going to top-post. We're mostly top-to-bottom readers here (makes following code and

Re: Look At This Package

2003-10-01 Thread James Edward Gray II
On Tuesday, September 30, 2003, at 08:44 PM, [EMAIL PROTECTED] wrote: OK version x.3 Please just change these lines to make it work. The calling program test.pl fails on the assignment line: Will do, but I'm not 100% sure you're listening to the suggestions we give. Bareword fname not allowed

Re: Look At This Package

2003-10-01 Thread James Edward Gray II
On Tuesday, September 30, 2003, at 09:04 PM, [EMAIL PROTECTED] wrote: Thank for you help. Now asome enlighten questions. - Are the fname and lname implicitly declared? These are now really variables, they're just keys to the hash we made into an object. - I guess you can't have vars outside of

Re: Look At This Package

2003-10-01 Thread perl
Ok - I got it finally. I've used the use strict; in my progs. You're right. it helps to identify loosely hanging vars that'll get ya. Thanks, I'm getting a hang of it slowly, frustratingly but surely. I'm just touching onto this perl class object thing but it seems pretty interesting. I'm trying

Re: Look At This Package

2003-10-01 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: Can someone make this work like I want? I'm trying to create a package USER and reference/change it. The only thing I'm able to do is to call the sub prtAll. I just want a structure that I can pass around in perl. test.pl --- use USER; #this does NOT work

RE: Look At This Package

2003-09-30 Thread Hanson, Rob
#this does NOT work #how do i reference these vars USER::fname=bob; USER::lname=Bingham; You need the $, like this... $USER::fname=bob; $USER::lname=Bingham; But this may be what you really want. It will allow you to create multiple USER objects, each with different values stored in them.

Re: Look At This Package

2003-09-30 Thread James Edward Gray II
On Tuesday, September 30, 2003, at 06:01 PM, [EMAIL PROTECTED] wrote: Can someone make this work like I want? I'm trying to create a package USER and reference/change it. The only thing I'm able to do is to call the sub prtAll. I just want a structure that I can pass around in perl. test.pl

Re: Look At This Package

2003-09-30 Thread perl
James and Bob, OK version x.2 - I want to create a user object with value initialized. - Initialize/Change it anytime test.pl --- use UserInfo; my $ui = new UserInfo(); $ui-(fname) = bob; $ui-(lname) = Bingham; #change name $ui-(fname) = robert; print ui: [ . $ui-full_name() . ]\n; exit

Re: Look At This Package

2003-09-30 Thread perl
James and Rob, OK version x.2 - I want to create a user object with value initialized. - Initialize/Change it anytime test.pl --- use UserInfo; my $ui = new UserInfo(); $ui-(fname) = bob; $ui-(lname) = Bingham; #change name $ui-(fname) = robert; print ui: [ . $ui-full_name() . ]\n; exit

Re: Look At This Package

2003-09-30 Thread James Edward Gray II
On Tuesday, September 30, 2003, at 06:51 PM, [EMAIL PROTECTED] wrote: James and Bob, OK version x.2 - I want to create a user object with value initialized. I showed you how to do this in my last message. Go back and take a look. - Initialize/Change it anytime It's best to do this with

RE: Look At This Package

2003-09-30 Thread Hanson, Rob
subclasses :) ...but I would hold off on that until everything else sinks in. Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 7:53 PM To: James Edward Gray II Cc: [EMAIL PROTECTED] Subject: Re: Look At This Package James and Rob, OK

RE: Look At This Package

2003-09-30 Thread perl
To: James Edward Gray II Cc: [EMAIL PROTECTED] Subject: Re: Look At This Package James and Rob, OK version x.2 - I want to create a user object with value initialized. - Initialize/Change it anytime test.pl --- use UserInfo; my $ui = new UserInfo(); $ui-(fname) = bob; $ui-(lname

Re: Look At This Package

2003-09-30 Thread perl
OK version x.3 Please just change these lines to make it work. The calling program test.pl fails on the assignment line: Bareword fname not allowed while strict subs in use at utest line 8. Bareword lname not allowed while strict subs in use at utest line 9. Bareword fname not allowed while

Re: Look At This Package

2003-09-30 Thread perl
Can't believe you guys didn't catch it. I had parenthesis instead of braces ;) $ui-(fname) = bob; #incorrect () $ui-{fname} = bob; #correct {} Thank for you help. Now asome enlighten questions. - Are the fname and lname implicitly declared? - I guess you can't have vars outside of the methods