Re: The 'if' module
- From: Ilya Zakharevich <nospam-abuse@xxxxxxxxx>
- Date: Mon, 5 Jun 2006 05:30:03 +0000 (UTC)
[A complimentary Cc of this posting was sent to
Sisyphus
<sisyphus1@xxxxxxxxxxxxxxxxx>], who wrote in article <4482c365$0$16769$afc38c87@xxxxxxxxxxxxxxxxxxxx>:
Okay. Please explain to me what you did when you saw that error
message. Because your apparent next attempt at the module call
certainly had nothing to do with anything the error message told you.
Well - you'll note that "my next attempt at the module call" added an extra
argument - which *did* have something to do with what the error message told
me. Not only that, but it worked to the extent that the script compiled
without any warnings being issued, and behaved as expected - iff CONDITION
was true. I think I was also sucked in by my own (false) assumption that I
knew what "use if CONDITION" (from the docs) meant. I was therefore lead to
concentrate on the "MODULE => ARGUMENTS" bit (which I wasn't sure about).
Beyond that I don't see much point in providing details on my (flawed)
thought processes.
I do. A little bit of history: when I designed if.pm, I had no the
idea that CONDITION is subject to cryptocontext. When somebody
reported this behaviour as a bug, the best "solution" I got was to try
to detect this situation (only possible when module is called without
arguments!), and provide a readable error message.
The current error message may be improved a lot. I welcome everybody
to think the message over and try to make it more clear. Likewise,
for
use if CONDITION, strict => 'refs';
with CONDITION returning en empty list, what the module sees is
CONDITION := 'strict', MODULE := 'refs'. Since there is no refs.pm,
the if.pm could also detect this, and emit a similar message.
Patches welcome,
Ilya
.
- References:
- The 'if' module
- From: Sisyphus
- Re: The 'if' module
- From: Sisyphus
- Re: The 'if' module
- From: Paul Lalli
- Re: The 'if' module
- From: Sisyphus
- The 'if' module
- Prev by Date: Re: DBI_DB2 problems
- Next by Date: perl cgi session module installation problem
- Previous by thread: Re: The 'if' module
- Next by thread: The 'if' module
- Index(es):
Relevant Pages
|