Cleaned Selenium Perl still does not work (what to do)?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Cleaned Selenium Perl still does not work (what to do)?

Post by dlukinski »

Hello XI support

Cleaned Selenium Perl (attached) still does not work (what to do)?

Code: Select all

[root@fikc-nagxidev01 libexec]# perl nagios_test1
"my" variable $sel masks earlier declaration in same scope at nagios_test1 line 61.
"my" variable $sel masks earlier declaration in same scope at nagios_test1 line 62.
"my" variable $sel masks earlier declaration in same statement at nagios_test1 line 62.
"my" variable $sel masks earlier declaration in same scope at nagios_test1 line 66.
"my" variable $sel masks earlier declaration in same scope at nagios_test1 line 73.
"my" variable $sel masks earlier declaration in same scope at nagios_test1 line 102.
"my" variable $sel masks earlier declaration in same scope at nagios_test1 line 103.
"my" variable $sel masks earlier declaration in same statement at nagios_test1 line 103.
"my" variable $sel masks earlier declaration in same scope at nagios_test1 line 107.
"my" variable $endtime masks earlier declaration in same scope at nagios_test1 line 114.
"my" variable $sel masks earlier declaration in same scope at nagios_test1 line 114.
syntax error at nagios_test1 line 37, near "elsif"
syntax error at nagios_test1 line 41, near "last WAIT }"
syntax error at nagios_test1 line 52, near "last WAIT }"
syntax error at nagios_test1 line 66, near "last WAIT }"
syntax error at nagios_test1 line 76, near "elsif"
syntax error at nagios_test1 line 80, near "last WAIT }"
syntax error at nagios_test1 line 91, near "last WAIT }"
syntax error at nagios_test1 line 107, near "last WAIT }"
syntax error at nagios_test1 line 117, near "elsif"
syntax error at nagios_test1 line 121, near "last WAIT }"
nagios_test1 has too many errors.
1..0
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Cleaned Selenium Perl still does not work (what to do)?

Post by mcapra »

Is this script of your own design? It doesn't look like anything clean_selenium_script would churn out.

An elsif chain is broken starting at line 37. If you break an elsif chain in perl (or most languages), you need to start it up with a new if evaluation.

There are also some scoping issues mentioned in your script's output.
http://perlmaven.com/scope-of-variables-in-perl
Former Nagios employee
https://www.mcapra.com/
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Cleaned Selenium Perl still does not work (what to do)?

Post by dlukinski »

mcapra wrote:Is this script of your own design? It doesn't look like anything clean_selenium_script would churn out.

An elsif chain is broken starting at line 37. If you break an elsif chain in perl (or most languages), you need to start it up with a new if evaluation.

There are also some scoping issues mentioned in your script's output.
http://perlmaven.com/scope-of-variables-in-perl
Please close this support thread

Thank you
Locked