Re: initializing a closure variable

2003-10-29 Thread Rob Dixon
Kevin Pfeiffer wrote: > > In article <[EMAIL PROTECTED]>, Rob Dixon wrote: > > > Kevin Pfeiffer wrote: > >> > >> I would have thought that this would initialize my $indent variable to 2 > >> (like setting an initial state for an object), but if I call "indent()" I > >> get nothing back. :-( > >> >

Re: initializing a closure variable

2003-10-28 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Rob Dixon wrote: > Kevin Pfeiffer wrote: >> >> I would have thought that this would initialize my $indent variable to 2 >> (like setting an initial state for an object), but if I call "indent()" I >> get nothing back. :-( >> >> >> { # static local variable >>my

Re: initializing a closure variable

2003-10-27 Thread Rob Dixon
Kevin Pfeiffer wrote: > > I would have thought that this would initialize my $indent variable to 2 > (like setting an initial state for an object), but if I call "indent()" I > get nothing back. :-( > > > { # static local variable >my $indent = 2; > >sub indent { > my $increment = sh

Re: initializing a closure variable

2003-10-26 Thread Rob Dixon
Kevin Pfeiffer wrote: > > In article <[EMAIL PROTECTED]>, Rob Dixon wrote: > > > Kevin Pfeiffer wrote: > >> > >> I would have thought that this would initialize my $indent variable to 2 > >> (like setting an initial state for an object), but if I call "indent()" I > >> get nothing back. :-( > [...]

initializing a closure variable

2003-10-26 Thread Kevin Pfeiffer
Hi Perlers, I would have thought that this would initialize my $indent variable to 2 (like setting an initial state for an object), but if I call "indent()" I get nothing back. :-( { # static local variable my $indent = 2; sub indent { my $increment = shift; $indent += $incre

Re: initializing a closure variable

2003-10-26 Thread Rob Dixon
Kevin Pfeiffer wrote: > > I would have thought that this would initialize my $indent variable to 2 > (like setting an initial state for an object), but if I call "indent()" I > get nothing back. :-( > > > { # static local variable >my $indent = 2; > >sub indent { > my $increment = sh

Re: initializing a closure variable

2003-10-26 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Rob Dixon wrote: > Kevin Pfeiffer wrote: >> >> I would have thought that this would initialize my $indent variable to 2 >> (like setting an initial state for an object), but if I call "indent()" I >> get nothing back. :-( [...] > Well yes, it will, but only when you

Re: initializing a closure variable

2003-10-26 Thread Jeff 'japhy' Pinyan
On Oct 26, Kevin Pfeiffer said: >> { >> my $indent = 2; >> >> sub indent { >> my $increment = shift; >> $indent += $increment if $increment; >> return $indent; >> } >> } > >Hmmm, I guess I would have to move it up or add a "BEGIN" label. Using a BEGIN block isn't a bad idea; jus

Re: Error checking.....a good way of doing it (was: Initializing code in a module...)

2003-07-15 Thread Jeff 'japhy' Pinyan
On Jul 15, Hamish Whittal said: >1) Keep a central 'repository' (a hash) of all errors that can be >generated in all the different modules and pass the error to a function >that decides what error to run. That sounds like a good idea. >package Common; > >sub ERRORSTRING { > >

Error checking.....a good way of doing it (was: Initializing code in a module...)

2003-07-15 Thread Hamish Whittal
Well thankyou all for the replies. (This must be one of the best lists I subscribe to.) Now, why I wanted to run the code each time I called the module... I am wanting to do error checking within my code. I am experimenting with the best ways to do this. 1) Keep a central 'repository' (a hash) of

Re: Initializing code in a module...

2003-07-14 Thread Tassilo von Parseval
On Mon, Jul 14, 2003 at 11:41:40AM +0200 Hamish Whittal wrote: > Anyone know whether or how I can initialise code when calling any of the > subroutines within a module? > I don't necessarily want to call the module personally, I would like it > to be called when I call any of the subroutines. You

Initializing code in a module...

2003-07-14 Thread Hamish Whittal
Hi People, Anyone know whether or how I can initialise code when calling any of the subroutines within a module? I don't necessarily want to call the module personally, I would like it to be called when I call any of the subroutines. Thanks in advance, Hamish -- To unsubscribe, e-mail: [EMAIL

Re: Initializing...

2002-09-06 Thread Janek Schleicher
Elliot Tobin wrote at Thu, 05 Sep 2002 20:35:48 +0200: > If my constructor takes four arguments, ala: > > my ($instanceName, $instanceHost, $instanceUser, $instancePass) = @_; > > What's an eloquent way of looping through those four and setting their > value to "" if there are no arguments pas

Re: Initializing...

2002-09-05 Thread Jeff 'japhy' Pinyan
On Sep 5, Elliot Tobin said: >If my constructor takes four arguments, ala: > >my ($instanceName, $instanceHost, $instanceUser, $instancePass) = @_; > >What's an eloquent way of looping through those four and setting their >value to "" if there are no arguments passed? Well, I take it you mean yo

Initializing...

2002-09-05 Thread Elliot Tobin
If my constructor takes four arguments, ala: my ($instanceName, $instanceHost, $instanceUser, $instancePass) = @_; What's an eloquent way of looping through those four and setting their value to "" if there are no arguments passed? -=[ Elliot @ pixeltree.org ]=- -- To unsubscribe, e-mail:

RE: Initializing CPAN

2002-06-26 Thread LoBue, Mark
oming FTP hole you created, if you don't need it. -Mark > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 24, 2002 8:09 PM > To: Beginners Perl Mailing List > Subject: RE: Initializing CPAN > > > On Tue, 25 Ju

RE: Initializing CPAN

2002-06-25 Thread eric-perl
On Tue, 25 Jun 2002, Fontenot, Paul wrote: > Let it have 20 and 21 for ftp I poked a hole in the firewall to accept all related/established packets coming *from* ports 20 & 21 but that didn't work. I seem to recall that ftp actually uses two different ports for the same dialogue. Can anyone refr

Initializing CPAN

2002-06-25 Thread eric-perl
Hello, All: Does CPAN use http? I'm using it on a machine that has all ports except smtp/ssh/http/https blocked. (i.e., ports 22/25/80/443 are the only open ports) I've just started using the CPAN module for the first time and am having some trouble during initialization: The process dies after

Re: Initializing / Changing values of @INC

2001-06-13 Thread Peter Scott
At 10:56 AM 6/14/01 +0900, Gupta, Ashish wrote: > >From where is the value of @INC initialized by Perl ? It's compiled in when perl is built. Do a strings `which perl` | grep / and you'll see it. >Can I change the value of @INC from within my program or from the >environment ? Both. The form

Initializing / Changing values of @INC

2001-06-13 Thread Gupta, Ashish
>From where is the value of @INC initialized by Perl ? Can I change the value of @INC from within my program or from the environment ? *** This communication is confidential and is intended only for the person to whom it is