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]
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]
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"
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]
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]
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]
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]
'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]
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&
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]
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
"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)
> 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
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
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
> 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
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
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]
; 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]>
19 matches
Mail list logo