All I am at a loss.
Possibly it's 2am and I can't see the wood for the trees, but this really
baffles me, in fact it is starting to annoy the heck outta me.

Below is a snippet of code, from a Multiplexer I have written to handle
URL's on the fly based upon database entires loaded in a module.
The problem I am getting is that If I use my module's values to define the
handlers to be used by mod_perl I get an 'Undefined subroutine
&Bficient::Apache::Test' error. However if I use a value taken from a hash I
defined inside my code I get no errors.
The issue I find baffling is that the two values ARE IDENTICAL???. I even
put a line in the below code to inform me that both values are the same as
defined by the perl 'eq' test.
anyway Here is my code:-

      my $handler_bf = $Bficient::Apache::Handlers::HANDLES->{$uri2};
      my $handler = $handlers{$uri2};
      print STDERR "'$handler' = '$handler_bf'\n";
      print STDERR "ARGHHHHHHHH\n" if ($handler eq $handler_bf);
            $full_uri =~ s/^$uri2/\//;
            $r->path_info($full_uri);

      ## and then install the appropriate perl handler
      $r->handler("perl-script");
      $r->push_handlers(PerlHandler => $handler);                 #THIS
WORKS
      #$r->push_handlers(PerlHandler => $handler_bf);          #THIS
DOESNT?????? WHY?????? if they both 'eq' each other!

      $r->log->debug("PerlHandler -> ". $handler);

      print STDERR "\$r is ".ref($r)."\n";
      return OK;

If I use the $handler_bf in my push_handlers() call I get the following log
output:-

Here are my current list of Handlers
$VAR1 = {
          '/reconciler/test/' => 'Bficient::Apache::Test'
        };
Here are my current list of Handlers_bf
$VAR1 = '/reconciler/test/';
$VAR2 = 'Bficient::Apache::Test';
URI=/reconciler/test
URI2=/reconciler/test/
'Bficient::Apache::Test' = 'Bficient::Apache::Test'
ARGHHHHHHHH
$r is Apache
[Fri Sep  6 03:15:00 2002] [error] Undefined subroutine
&Bficient::Apache::Test called.

HOWEVER if I use the $handler value Everythign is fine and it works and here
is the output in the logs:-

Here are my current list of Handlers_bf
$VAR1 = {
          '/reconciler/test/' => 'Bficient::Apache::Test'
        };
Here are my current list of Handlers none bf
$VAR1 = '/reconciler/test/';
$VAR2 = 'Bficient::Apache::Test';
URI=/reconciler/test
URI2=/reconciler/test/
'Bficient::Apache::Test' = 'Bficient::Apache::Test'
ARGHHHHHHHH
$r is Apache


I have tried swapping the variables over and stopping and starting Apache
and reloading my test page and still the same results.
how can two values which are equal, not produce the same results............

Please any ideas would be welcome, however I'm now off to bed as this isn't
what I planned to be doing on the eve of my birthday grrrrrrrrr:-)

Regards

Marty

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to