How to use parse_opts to  specify CVS tree as an option

Posted on 2006-06-20
Last Modified: 2011-08-18
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.

Question by:AnuPutcha
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1

Expert Comment

by:Suhas .
ID: 16950030
Hi AnuPutcha,
To run command line options in script use system:

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

LVL 39

Expert Comment

ID: 16951941
Could you clearify, I'm not sure what you want to do?
LVL 84

Expert Comment

ID: 16953184
use Getopt::Long;
my $branch;
$result = GetOptions("cvstree=s" => \$branch);

Independent Software Vendors: 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!


Author Comment

ID: 16954209
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?

LVL 39

Expert Comment

ID: 16954451
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.  


Expert Comment

by:Suhas .
ID: 16966640
LVL 39

Accepted Solution

Adam314 earned 125 total points
ID: 16971622
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?

Author Comment

ID: 16973265
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.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question