Module Maintenance
merged, then a conflict results. See the CVS documentation for information on 
merging and conflict resolution.
Making Changes
Now that I have Data::Counter in CVS, let's take it out for a spin. To demonstrate 
making changes, I'll add a new subroutine to Data::Counter count_char(), which 
counts the occurrences of character in a string:
sub count_char {
  my ($pkg, $char, $string) = @_;
  return $string =~ tr/$char/$char/;
}
I'll also add a new test to t/02basic.t:
is(Data::Counter >count_char( a ,  abababa ), 4);
After making the changes, I can get a list of changed files using the cvs update
command:
$ cvs  q update
M Counter.pm
M t/02basic.t
The  q option stands for  quiet,  and in this case suppresses the printing of 
unchanged files. The M in front of Counter.pm and t/02basic.t means  modified.  
This tells you that the files have been modified since the last time they were com 
mitted to the repository. Another useful CVS feature is the ability to request a diff 
against the version in the repository with cvs diff:
$ cvs diff  u
cvs diff: Diffing .
Index: Counter.pm
===================================================================
RCS file: /home/sam/cvs/Data Counter/Counter.pm,v
retrieving revision 1.1.1.1
diff  u  r1.1.1.1 Counter.pm
    Counter.pm         2002/02/04 01:31:54       1.1.1.1
+++ Counter.pm       2002/02/04 06:24:41
@@  34,6 +34,11 @@
   return scalar @_;
 }
15
153
3






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

web hosting perl

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved