summaryrefslogtreecommitdiff
path: root/Porting
diff options
context:
space:
mode:
authorJos I. Boumans <kane@dwim.org>2006-12-15 21:51:45 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-19 15:07:45 +0000
commit687d3573c7533b89705e64f529b53c631cb9dec0 (patch)
treed9ec7bf7b365d8ca462debe7fc0ba81fb2086556 /Porting
parent2ae48df0f018213e8336ab227bb84aba249da141 (diff)
downloadperl-687d3573c7533b89705e64f529b53c631cb9dec0.tar.gz
Making adding binary files possible
From: "Jos Boumans" <kane@dwim.org> Message-ID: <19978.80.127.35.68.1166212305.squirrel@webmail.xs4all.nl> with a few tweaks p4raw-id: //depot/perl@29593
Diffstat (limited to 'Porting')
-rw-r--r--Porting/patching.pod19
1 files changed, 19 insertions, 0 deletions
diff --git a/Porting/patching.pod b/Porting/patching.pod
index 47ebbb194a..5114d72a57 100644
--- a/Porting/patching.pod
+++ b/Porting/patching.pod
@@ -151,6 +151,25 @@ you have your changes, you would run makepatch as follows:
-diff "diff -u" \
perl-5.7.1@8685 perl-5.7.1@8685-withfoo
+=item Binary Files
+
+Since the patch(1) utility can not deal with binary files, it's important
+that you either avoid the use of binary files in your patch, generate the files
+dynamically or that you encode any binary files using the C<Porting/pack.pl>
+utility.
+
+Assuming you needed to include a C<gzip> encoded file for a module's test suite,
+you might do this as follows using the C<Porting/pack.pl> utility:
+
+ $ perl Porting/pack.pl -v -D lib/Some/Module/t/src/t.gz
+ Writing lib/Some/Module/t/src/t.gz into lib/Some/Module/t/src/t.gz.packed
+
+This will replace the C<t.gz> file with an encoded counterpart. During
+C<make test>, before any tests are run, Perls Makefile will restore all the
+C<.packed> files mentioned in the C<MANIFEST> to their original name. This
+means that the test suite does not need to be aware of this packing scheme and
+will not need to be altered.
+
=item Try it yourself
Just to make sure your patch "works", be sure to apply it to the Perl