8 use Data::Dump qw(dump);
10 my $url = 'http://localhost:3000/data/edit';
15 my $t = Mojo::Client->new;
16 $t->max_redirects( 1 );
18 foreach my $c ( sort {
19 my $at = $1 if $a =~ m/(\d+\.\d+)/;
20 my $bt = $1 if $b =~ m/(\d+\.\d+)/;
26 my $params = retrieve $c;
27 my $hash = $params->to_hash;
28 $hash->{time} = $1 if $c =~ m{/(\d+\.\d+)\.data\.edit};
30 warn "# hash ",dump($hash);
32 my $tx = $t->post_form( $url => $hash );
33 if ( my $res = $tx->success) { print $res->body }
35 my ($code, $message) = $tx->error;
36 die "Error: $message";
39 # last if $max-- == 0;