Commit | Line | Data |
d80786d0 |
1 | package HTML::Zoom::MatchWithoutFilter; |
2 | |
3 | use strict; |
4 | use warnings FATAL => 'all'; |
5 | |
6 | sub construct { |
7 | bless({ |
8 | zoom => $_[1], match => $_[2], fb => $_[3], |
9 | }, $_[0]); |
10 | } |
11 | |
12 | sub DESTROY {} |
13 | |
14 | sub AUTOLOAD { |
15 | my $meth = our $AUTOLOAD; |
16 | $meth =~ s/.*:://; |
17 | my $self = shift; |
18 | if (my $cr = $self->{fb}->can($meth)) { |
19 | return $self->{zoom}->with_filter( |
20 | $self->{match}, $self->{fb}->$cr(@_) |
21 | ); |
22 | } |
23 | die "Filter builder ${\$self->{fb}} does not provide action ${meth}"; |
24 | } |
25 | |
26 | 1; |