in reply to Re^2: LWP handlers examples?
in thread LWP handlers examples?

It's strange that the message is printed twice since it is being called once!!! Why?

I suspect two responses were received, the first being a redirect.

Replies are listed 'Best First'.
Re^4: LWP handlers examples?
by vitoco (Hermit) on Aug 12, 2009 at 20:59 UTC

    You are right on this... change the unnamed sub to show that:

    $ua->add_handler(response_header => sub { print("HANDLER:", $_[0]->status_line(), "\n"); });

    That will be another thing I'll have to manage...