Chapter 6
The additional r option tells diff to operate recursively. The contents of
newcount.patch after this command are as follows:
diff ur Counter.orig/Counter.pm Counter/Counter.pm
Counter.orig/Counter.pm Sun Jan 27 14:59:49 2002
+++ Counter/Counter.pm Sun Jan 27 15:00:00 2002
@@ 29,7 +29,10 @@
# Preloaded methods go here.
sub count { return scalar @_ }
+sub count {
+ my $pkg = shift;
+ return scalar @_;
+}
1;
__END__
diff ur Counter.orig/t/02basic.t Counter/t/02basic.t
Counter.orig/t/02basic.t Sun Dec 9 21:29:35 2001
+++ Counter/t/02basic.t Sun Jan 27 15:00:51 2002
@@ 1,3 +1,3 @@
use Test::More tests => 1;
use Data::Counter;
is(Data::Counter::count( foo , bar ), 2);
+is(Data::Counter >count( foo , bar ), 2);
As you can see, this patch contains differences to both Counter.pm and 02basic.t.
Applying Multifile Patches
To apply the multifile patch created using the technique shown in the preceding
section, you need to use the p1 option. This option tells patch to strip a single
leading directory from the filenames specified in the diff headers. For example, the
header for the changes to 02basic.t reads as follows:
Counter.orig/t/02basic.t Sun Dec 9 21:29:35 2001
+++ Counter/t/02basic.t Sun Jan 27 15:00:51 2002
148
footer
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