Re: max/min

2002-04-12 Thread Richard J. Barbalace
likely faster than repeating a O(n) foreach multiple times. (You could modify the foreach to return multiple values upon iterating the list once, but that would sacrifice significant clarity.) + Richard J. Barbalace -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Perl code - Coverage

2002-01-17 Thread Richard J. Barbalace
past year, so you might ask the author if he has a newer version, or is working on one. + Richard J. Barbalace Cambridge, MA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Resume after die?

2002-01-04 Thread Richard J. Barbalace
Jenda writes: > Well ... what about just ... making the eval{} block smaller? > > eval { ># Code where an error may occur >exception_causing_method(); > }; > if ($@) { ... } > # Code where I want to resume after handling the exception > print "Continuing\n"

Re: Resume after die?

2002-01-04 Thread Richard J. Barbalace
w the exception is caused. Can anyone recommend a technique to do this type of resumptive exception handling in perl? I suspect it involves something more complicated than an eval {BLOCK} form. Thanks. + Richard J. Barbalace Cambridge, MA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Resume after die?

2002-01-03 Thread Richard J. Barbalace
tion handling in Perl? I have code that allows redoing the entire eval block or simply continuing after the eval block, but I have not found any way to resume inside the eval block. + Richard J. Barbalace Cambridge, MA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Login methods / passing values

2001-11-16 Thread Richard J. Barbalace
the same machine as the original user, which might make it less useful. There are various ways to do the above. Talk to your local security expert for more ideas. + Richard J. Barbalace <[EMAIL PROTECTED]> Cambridge, Massachusetts, USA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Off-Topic (200%) - Where are you from? - Results

2001-11-14 Thread Richard J. Barbalace
ngs to this list. I certainly won't remember where everyone is from otherwise, and it is useful to note a poster's location and time zone difference. + Richard J. Barbalace [EMAIL PROTECTED] Cambridge, Massachusetts, USA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Problem using IF with AND

2001-10-31 Thread Richard J. Barbalace
'and' and &&, if the first part ($client ne $newclient) is false, the whole condition must be false, so the second part ($method ne $newmethod) is not evaluated. Similarly for 'or' and ||, if the first part is true, the whole condition must be true, so the second part is not evaluated. + Richard J. Barbalace (a little behind on the list digests) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Array of Hashes?

2001-09-24 Thread Richard J. Barbalace
tname, however, there's no reason not to use an array of hashes. To print out the data you can do something like: foreach my $hostname (@hostnames) { print "Hostname: $hostname\n"; print "Address: ".$hosts{$hostname}->{ipaddr}."\n&

Re: Math::BigInt

2001-09-14 Thread Richard J. Barbalace
23123.12345. Value 2: 1123579912.12345. Value 3: 1123579912123450.. Value 4: 1123579912123450. Value 5: 1123579912123450:test. It seems awful to call Math::BigFloat->new() three times to do the calculation part. Is there a simpler way of doing this? + Richard J. Barbalace <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Math::BigInt

2001-09-13 Thread Richard J. Barbalace
string $string to be "1234567890123457123456:test". When I tried using BigInt with floating point numbers like $float, I end up with NaN and then get errors like: Can't locate object method "badd" via package "NaN"... Any ideas on how to do this conversion simply? Thanks. + Richard J

Re: beginners Digest 9 Aug 2001 12:42:51 -0000 Issue 305

2001-08-09 Thread Richard J. Barbalace
"Kevin Hundley" <[EMAIL PROTECTED]> writes: > The code does exactly what I want. However, I get the following message > (when the perl -w option is enabled): > Use of uninitialized value at (eval 11) line 17. > > Is this message something I should just live with (or turn off the -w > option)

Re: beginners Digest 8 Aug 2001 19:36:47 -0000 Issue 302

2001-08-08 Thread Richard J. Barbalace
> From: "Scott" <[EMAIL PROTECTED]> > To: "Joe Bellifont" <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> > Subject: RE: modules > Date: Wed, 8 Aug 2001 10:29:05 -0700 > > Here is some code that will list all installed modules > > #!/usr/bin/perl -w > use ExtUtils::Installed; > my $instmod = Ex

Re: Inheritance of package global variables

2001-06-28 Thread Richard J. Barbalace
in the parent package that is smart enough to do the necessary error validation for all inheriting packages, instead of having a separate specialized 'set' method for each package. This is a real savings since I have a large number of inheriting packages. I have not been able to find a perl module that would allow this sort of inheritance and data validation; does anyone know of one that does this? Or can anyone suggest a better way of doing what I want? + Richard J. Barbalace

Inheritance of package global variables

2001-06-28 Thread Richard J. Barbalace
me, but I also need to have the package global variable %Attributes inherited. The 'use vars' and assignment in MyPackage is rather verbose, and I'm wondering if there is a better or terser way of doing that. What's the recommended way of inheriting package global variables? + Richard J. Barbalace

Re: package verification

2001-06-26 Thread Richard J. Barbalace
> On Mon, Jun 25, 2001 at 06:13:18PM -0400, Richard J. Barbalace wrote: > > > I'm writing a package that uses another module. This latter module may > > change somewhat erratically and unreliably, outside of my control. As > > a result, I want to have the pack

package verification

2001-06-26 Thread Richard J. Barbalace
o avoid these warnings? Or is there a way to suppress them? Is there a better way to do this sort of thing? Long term, I plan to find a better module than Flakey or incorporate its compatible parts into MyPackage to manage this problem, but I'm looking for a short-term fix for now. + Richard J. Barbalace

Re: DBI Module

2001-06-22 Thread Richard J. Barbalace
general. If you're new to MySQL too, then I'll also recommend getting the New Riders book "MySQL" by Paul DuBois. I have used both books substantially and found them essential for large projects using Perl and MySQL. + Richard J. Barbalace [EMAIL PROTECTED]

caller function

2001-06-20 Thread Richard J. Barbalace
; confusing? 3) Why does "caller" return the "wrong" subroutine name? Or perhaps, why is the subroutine name returned by "caller" the right one to return? 4) How is "caller" usually used by perl experts? 5) Is there something wrong with my use of "caller" to find the error data I want? 6) Is there a better way of getting this data? Any enlightenment you can provide would be appreciated. + Richard J. Barbalace <[EMAIL PROTECTED]>