#!/usr/bin/perl BEGIN { unshift @INC, "/home/steve/perl/perl-lib" } use strict; use warnings; use FFMech; my $ffm = FFMech->new; #### package FFMech; use strict; use warnings; $ENV{'DISPLAY'} = ':0.0'; use X11::GUITest qw/SendKeys FindWindowLike ClickWindow SetEventSendDelay/; use Moose; extends 'WWW::Mechanize::Firefox'; has 'window_id' => ( is => 'ro', isa => 'Int', ); #### Failed to connect to , problem connecting to "localhost", port 4242: Connection refused at /usr/local/share/perl/5.20.2/MozRepl/Client.pm line 144 #### my $mech->new(launch => 'firefox');