I get following error when I run the code below it. I don't seem to find error. Please let me know whats wrong in here
D:\Interwoven\TeamSite\iw-perl\bin>iwperl
D:\Interwoven\TeamSite\custom\tsadm\testFile3.pl
Global symbol "$cmd" requires explicit package name at D:\Interwoven\TeamSite\custom\tsadm\testFile3.pl line 32.
Global symbol "@output" requires explicit package name at D:\Interwoven\TeamSite\custom\tsadm\testFile3.pl line 33.
Global symbol "$cmd" requires explicit package name at D:\Interwoven\TeamSite\custom\tsadm\testFile3.pl line 33.
Global symbol "$rc" requires explicit package name at D:\Interwoven\TeamSite\custom\tsadm\testFile3.pl line 35.
Global symbol "@output" requires explicit package name at D:\Interwoven\TeamSite\custom\tsadm\testFile3.pl line 37.
Global symbol "$rc" requires explicit package name at D:\Interwoven\TeamSite\custom\tsadm\testFile3.pl line 43.
Execution of D:\Interwoven\TeamSite\custom\tsadm\testFile3.pl aborted due to compilation errors.
use warnings;
#use strict;
use strict;
use TeamSite::Config;
use TeamSite::WFtask;
use TeamSite::WFworkflow;
#---------------------------------------------------------------------
# Workflow variables
#
(my $iwhome = TeamSite::Config::iwgethome()) =~ tr|\\|/|;
(my $iwmount = TeamSite::Config::iwgetmount()) =~ tr|\\|/|;
my @tmp_home = split("/TeamSite",$iwhome);
$iwhome = $tmp_home[0];
my ($jobid, $taskid, $area ) = (shift, shift, shift);
#my $task = TeamSite::WFtask->new($taskid);
my $task = new TeamSite::WFtask($taskid);
my $taskname=$task->GetName();
$area =~ tr |\\|/|;
my $branch = $area;
$branch =~ /default\\main\\(.*)\\WORKAREA/;
$branch = $1;
my @workArea =split("/",$area);
my $source;
my $target_production;
my $path;
my $od_conf;
my $execute_cmd = 1;
# $filelist = "C:\\Users\\Administrator\\Desktop\\Test\\printFile.txt"
+;
$cmd = "D:\\Interwoven\\OpenDeployNG\\bin\\iwodcmd start D:\\Interwove
+n\\OpenDeployNG\\conf\\tsadm\\test_jignesh";
@output = `$cmd`;
$rc = $?;
my $success_flag = 0;
foreach (@output) {
$success_flag = 1 if (/ERROR/i);
$success_flag = 1 if (/Status: Failed/i);
}
# Check for the success/failure of the deployment process.
if ($rc eq "0" && $success_flag != 1) {
print "<b>Your Files have been deployed Successfully.</b> <br>
+<br>";
#print "Below is output... <br><br>";
#print "@output <br>";
# Deployment successful... transition to closure
$task->CallBack(0, "Completed Deploy Process");
}
else
{
print "<b>Deployment Failed</b>. <br><br>";
print "Please Contact TeamSite Admin with the following error.
+.. <br><br>\@output";
print "<br><br><br>";
# Deployment failed... Do not close this job.
print "<b>Your Job is still active. To initiate deployment aga
+in, you can switch to 'Workflow' tab and use the existing job</b><br>
+<br>";
$task->CallBack(1, "Deployment Failed");
}
# $filelist = "C:\\Documents and Settings\\Administrator\\Desktop\\tes
+t\\printFile.txt";
#
# print "FileList : ". $filelist;
#
# my @files = (file1, file2, file3);
# open(WRITEFILE, ">$filelist") || die("ERROR: unable to open file: $
+! \n");
# select WRITEFILE;
# foreach my $file (@files){
# print WRITEFILE "$file\n";
# }
# close WRITEFILE;
I found it, I put "my" before these variables. Those eror are gone. Now I m getting following errors
D:\Interwoven\TeamSite\iw-perl\bin>iwperl D:\Interwoven\TeamSite\custom\tsadm\te
stFile3.pl
Use of uninitialized value in transliteration (tr///) at D:\Interwoven\TeamSite\
custom\tsadm\testFile3.pl line 19.
Use of uninitialized value in pattern match (m//) at D:\Interwoven\TeamSite\cust
om\tsadm\testFile3.pl line 21.
Use of uninitialized value in split at D:\Interwoven\TeamSite\custom\tsadm\testF
ile3.pl line 23.
Locating OpenDeploy service.
Got OpenDeploy service
>>>>>-- Start deployment D:\Interwoven\OpenDeployNG\conf\tsadm\test_mr.
iwodstart running in default synchronous mode.
Need to wait for deployment to complete.
***ERROR - Starting deployment.
Reason from server: DEPLOY_CONFIG_FILE
Details : Deployment config file not found (D:\Interwoven\OpenDeploy
NG\conf\D:\Interwoven\OpenDeployNG\conf\tsadm\test_jignesh.xml)
Deployment Failed.
Please Contact TeamSite Admin with the followi
ng error...
@output
Your Job is still active. To initiate
deployment again, you can switch to 'Workflow' tab and use the existing jobTask 1 does not exist.
ERROR:00920: Object being looked up was not found
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.