Solved

How to use parse_opts to  specify CVS tree as an option

Posted on 2006-06-20
8
576 Views
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.

Thanks,
Anu.
0
Comment
Question by:AnuPutcha
[X]
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
8 Comments
 
LVL 9

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");

Cheers!
Suhas
0
 
LVL 39

Expert Comment

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

Expert Comment

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

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:AnuPutcha
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?


Thanks
0
 
LVL 39

Expert Comment

by:Adam314
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.  

0
 
LVL 9

Expert Comment

by:Suhas .
ID: 16966640
0
 
LVL 39

Accepted Solution

by:
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?
0
 

Author Comment

by:AnuPutcha
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.

Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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 …
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…
Six Sigma Control Plans

636 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