Re: Use of hash variables in module call - puzzling behaviour

Henry Law <news@xxxxxxxxxxxxx> wrote:
> Anno Siegel wrote:
> > Swap the "Sending with G_server variables" and "Sending with g_server
> > variables" blocks. It could be the second call that fails instead of
> > depending on which hash is used. Perhaps one of the objects involved
> > ($mail or $header) is damaged after the first use.

> I had already tried that; it's the $g_server version that fails
> consistently.

That would have been my first recommendation. Second would be to abstract
away the repeated code, just to make sure there is not some subtle (or
invisible funky character) difference in the code which executes under the
two hashes.

foreach my $hashref (\%g_server, \%G_server) {
# etc.
@recipients = $mail->smtpsend(Host=>$hashref->{smtpserver},
# etc.


-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB

Relevant Pages

  • Re: CeDeleteRecord Anomalies
    ... > I am trying to use the CeDeleteRecord function on CE4.2. ... > this function fails (repeatable depending on the database I'm using). ... Does your database contain Text as well? ...
  • Re: Config::General Failing test in ActivePerl
    ... > Test 8 is writing a hash to a file, and reloading it, and seeing if it ... It fails where a multi-line string is written out. ...
  • Re: Ping Platy and other chair lovers
    ... playing silly buggers. ... creating a torrent, I figured out what I was meant to do, but now it always fails when trying to hash the files. ...
  • Re: How to implement a Hash Table in C
    ... You can read all about hash tables in my book, ... As for the derefencing null pointer, that will happen if the constructor fails, and return NULL. ... The normal thing when you an error such as dereference of a null is to say "your code derererences a null" rather than to talk airly about "catastropic behaviour" in an arrogant manner. ...
  • Re: bug in Time.parse?
    ... fails on Time objects generated by Time.parse when the compared ... The parsed object appears smaller to. ... Looking into the Ruby documentation, I see a note regarding resolution: may be off by fractions of seconds, depending on your computer. ... For example, *nixes calculate the time using January 1st 1970 as starting point, and calculate the seconds passed since then. ...