[EMAIL PROTECTED] (will trillich) wrote:
> >    sub search {
> >        # ....
> >        {
> >            use CGI qw/:standard/;
> >            my       $form = join '',
> >                map {
> >                    hidden(
> >                        -name => $_,
> >                        -value => $arg->{$_},
> >                        ) . "\n"
> >                }
> >                grep(
> >                    $arg->{$_} and ($_ ne 'd') and ($_ ne 'go')
>
>as is, the functions that follow (top-level 'sub xyz {}') get
>screwy. code disappears.
>
>replace "and" with "&&" and all is well. boggles my mind.


Well, as far as I can tell, the original code doesn't even compile
because there aren't enough arguments to grep().  That's why I couldn't
test it.  I suppose changing the precedence helped things out.  Perhaps
you should use the more explicit BLOCK version:

            my $form = join '',
                map 
                  {
                    hidden(
                        -name => $_,
                        -value => $arg->{$_},
                        ) . "\n"
                  }
                grep 
                  {
                    $arg->{$_} and ($_ ne 'd') and ($_ ne 'go')
                  }
                keys %$arg;

>
>with 'and' *{$My::Debacle::{handler}}{CODE} doesn't exist.

That's an illusion.  The truth is that with 'and' the code is checking
something completely different, or not working at all.

This is turning out to be pretty well off-topic for the mod_perl list,
so we should cease.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum

Reply via email to