… | |
… | |
15 | sub on_user_command { |
15 | sub on_user_command { |
16 | my ($self, $cmd) = @_; |
16 | my ($self, $cmd) = @_; |
17 | if($cmd =~ s/^matcher\b//) { |
17 | if($cmd =~ s/^matcher\b//) { |
18 | $self->most_recent; |
18 | $self->most_recent; |
19 | } |
19 | } |
|
|
20 | () |
|
|
21 | } |
|
|
22 | |
|
|
23 | sub most_recent { |
|
|
24 | my ($self) = shift; |
20 | my $row = $self->nrow; |
25 | my $row = $self->nrow; |
21 | my @exec; |
26 | my @exec; |
22 | while($row-- > $self->top_row) { |
27 | while($row-- > $self->top_row) { |
23 | #my $line = $self->line ($row); |
28 | #my $line = $self->line ($row); |
24 | #my $text = $line->t; |
29 | #my $text = $line->t; |
… | |
… | |
29 | return $self->exec_async (@exec); |
34 | return $self->exec_async (@exec); |
30 | } |
35 | } |
31 | () |
36 | () |
32 | } |
37 | } |
33 | |
38 | |
34 | sub most_recent { |
|
|
35 | my ($self) = shift; |
|
|
36 | () |
|
|
37 | } |
|
|
38 | |
|
|
39 | sub my_resource { |
39 | sub my_resource { |
40 | my $self = shift; |
40 | my $self = shift; |
41 | $self->x_resource("$self->{name}.$_[0]"); |
41 | $self->x_resource ("$self->{name}.$_[0]"); |
42 | } |
42 | } |
43 | |
43 | |
44 | # turn a rendition spec in the resource into a sub that implements it on $_ |
44 | # turn a rendition spec in the resource into a sub that implements it on $_ |
45 | sub parse_rend { |
45 | sub parse_rend { |
46 | my ($self, $str) = @_; |
46 | my ($self, $str) = @_; |