Hi there,

On 21 Jan 2000, Fernando Rowies wrote:

> first: trying example 4-9 from eagle book the result is an unvarying
> behavior. Running for first time it display the banner randomly,
> then, when i reload the page, take another randomly, but the third
> or fourth reload, no more pick_randomly_the_image, it display the
> last, the last, last, last, last... what happen?

I think maybe you need to check your typing carefully.  If you mail
your code I can check it for you very quickly.

> second: same example with the two last lines from the handler()
> subroutine replaced with the code suggested in the book (to suppress
> the "bad performance bottleneck" in the original example), no more
> images at all, just broken image icons. again, what happen?

I think the book has some mistakes.  Try `lookup_file()' instead of
`lookup_uri()' in the first line of the code on page 128 and put

return OK if $r->header_only;

instead of

return OK unless $r->header_only;

at the fourth line, the same as in the fragment of code lower down
on that same page.

When you get to the second code fragment, don't forget to import
DOCUMENT_FOLLOWS by adding it at the top of the file:

use Apache::Constants qw(:common REDIRECT DOCUMENT_FOLLOWS);
                                          ^^^^^^^^^^^^^^^^
73,
Ged.

Reply via email to