Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 580
  • Last Modified:

How to use parse_opts to specify CVS tree as an option

I have a perl script which will need a way to specify the version of the tool that it will invoke.

Eg: run_app -cvstree  app_1.0.1.

I will be using parse_opts to parse the cmd line options. But it not clear to me how to write code to pick the CVS Tree branch as specified in the cmd line option.

Thanks,
Anu.
0
AnuPutcha
Asked:
AnuPutcha
  • 3
  • 2
  • 2
  • +1
1 Solution
 
Suhas .QA ManagerCommented:
Hi AnuPutcha,
To run command line options in script use system:

system("run_app -cvstree app_1.0.1");

Cheers!
Suhas
0
 
Adam314Commented:
Could you clearify, I'm not sure what you want to do?
0
 
ozoCommented:
use Getopt::Long;
my $branch;
$result = GetOptions("cvstree=s" => \$branch);

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AnuPutchaAuthor Commented:
I want to be able to specify a CVS branch as an option to a perl script so that the right version of the script is selected. Also can someone tell me how to see the CVS tree/ a cmd to see CVS tree?


Thanks
0
 
Adam314Commented:
How would you specify which branch to run if you ran it from the command line?
Or how would you view a particular version of a file if you wanted to view it?

Once you have that, use the system command to start the same script, but the correct version.  

0
 
Suhas .QA ManagerCommented:
0
 
Adam314Commented:
According to that (and some other sites), it sounds like you can only access a particular version of a file if you check it out.  Is this correct?
Can you view a particular version of a file with out checking it out?
0
 
AnuPutchaAuthor Commented:
You are correct, apparently I cannot access a version without checking it out locally. I din't know this before and so I was thinking I could do that and wnated to know how to access CVS branch without checking it out.

Thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now