Thilo,
Thanks; I already figured it had something to do with me rather than
ARSperl... ;-)
Regards,
Michiel
On 8/14/07, Thilo Stapff <thi...@ap...> wrote:
> The ars_GetFieldTable function probably works correctly in both cases.
> The observed behaviour is due to the fact that the "||" operator has
> higher precedence than "=", for further information see:
>
> http://perldoc.perl.org/perlop.html#C-style-Logical-Or-%7c%7c-operator%2c-logical%2c-or
>
>
> Perl has also an "or" operator (with lower precedence), which works as
> expected:
>
> my %fieldname_to_id = ars_GetFieldTable($c, "User") or die $ars_errstr;
>
>
> Regards,
> Thilo
>
>
> Michiel Beijen wrote:
> > The ars_GetFieldTable call behaves strange.
> >
> > When I do
> >
> > my %fieldname_to_id = ars_GetFieldTable($c, "User") ||
> > die $ars_errstr;
> > the hash is almost empty but when I put the statement between () the
> > hash is nicely populated:
> >
> > (my %fieldname_to_id = ars_GetFieldTable($c, "User")) ||
> > die $ars_errstr;
> >
> > Does this make sense?
> >
> > Regards,
> >
> > Michiel
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Arsperl-devel mailing list
> > Ars...@ar...
> > https://lists.sourceforge.net/lists/listinfo/arsperl-devel
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-devel mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-devel
>
|