Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

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 job

Task 1 does not exist. ERROR:00920: Object being looked up was not found

In reply to Code is giving "explicit package name required" error by manishrathi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (8)
    As of 2015-07-07 12:38 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (88 votes), past polls