How do you give WWW :: Mechanize :: Firefox permission to launch Firefox?

I am on a Mac. I have a simple Perl script that uses WWW :: Mechanize :: Firefox to pull out a webpage.

The script works fine when Firefox is already open and running on my computer. Here the line creates an object:

my $mech = WWW::Mechanize::Firefox->new(
  launch => '/Applications/Firefox.app'
);

However, when Firefox shuts down and I run the script, I get the following error:

exec failed: Permission denied at /Library/Perl/5.12/MozRepl/RemoteObject.pm line 463
 at /Library/Perl/5.12/MozRepl/RemoteObject.pm line 463

What should I do to give perl script permission to run Firefox?

+2
source share
1 answer

Try:

my $mech = WWW::Mechanize::Firefox->new(
  launch => '/Applications/Firefox.app/Contents/MacOS/firefox'
);

/Applications/Firefox.app - , , . Contents/MacOS/firefox .

+3

Source: https://habr.com/ru/post/1774658/


All Articles