http://qs321.pair.com?node_id=411686


in reply to Janitors Thread Retitler v1

Nice work davido!

A couple of points:

1. Please add a <p><small>"Edit by [$user] - Retitle from '$orig_title'"</small></p> to the end of the root node while retitling, else we'll still have to do that bit by hand.

2. I'd prefer to be able to enter the original title on the command line too, so that I can just start it and forget, and not have to wait for it to ask if I want to continue.

3. If I enter an invalid node id, the xml node thread ticker gives back a valid but empty list, you should probably check if the title it gives has a length. (Someone should probably patch the ticker not to do this, see my post in the Scriptorium).

4. I have WWW::M 0.70, so I replaced your line

$agent->click_button( 'value' => 'update' );
with
$agent->current_form->value('blah','update'); $agent->click('blah');
stolen from Corions version, and it seems to work fine.

C.