Yes, it applies to your situation. I couldn't install X11::GUITest, so I created a dummy package to illustrate the technique.
The package 'Bogus' in my example is analogous to X11::GUITest in your example i.e. it contains the subs that you want to wrap.
So translating to your example it would look like:
package X11_GUITest_Wrapper;
use Moose;
use MooseX::NonMoose;
extends 'X11::GUITest';
around [qw( SendKeys FindWindowLike ClickWindow SetEventSendDelay )] =
+> sub {
my $orig = shift;
my $self = shift;
$orig->(@_);
};
1;
Then to use it:
package FFMech;
$ENV{'DISPLAY'} = ':0.0';
use Moose;
use Modern::Perl;
use MooseX::NonMoose;
extends 'WWW::Mechanize::Firefox';
has 'x11_guitest_wrapper' => (
is => 'bare',
default => sub { X11_GUITest_Wrapper->new },
handles => [qw( SendKeys FindWindowLike ClickWindow SetEventSendDe
+lay )],
);
# ...
1;