diff options
author | Dave Rolsky <autarch@urth.org> | 2009-10-30 11:10:10 -0500 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2009-10-30 12:44:51 -0400 |
commit | 168a53cc0d4ae0ff86a6afb90d36aee4047e7db2 (patch) | |
tree | 086cd79fa5298676ef2e3fb38a64b82e0dd7e7ae | |
parent | 8eb5594e5b00118ae265dfff7fa7bd96290d4ed3 (diff) | |
download | perl-168a53cc0d4ae0ff86a6afb90d36aee4047e7db2.tar.gz |
Remove obsolete details on how to format a patch. Just point to perlrepository instead.
-rw-r--r-- | pod/perlhack.pod | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/pod/perlhack.pod b/pod/perlhack.pod index b4ff42647f..abd0933a87 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -1508,6 +1508,10 @@ C<U> is the first active format during a C<pack>, (for example, C<pack "U3C8", @stuff>) then the resulting string should be treated as UTF-8 encoded. +If you are working with a git clone of the Perl repository, you will want to +create a branch for your changes. This will make creating a proper patch much +simpler. See the L<perlrepository> for details on how to do this. + How do we prepare to fix this up? First we locate the code in question - the C<pack> happens at runtime, so it's going to be in one of the F<pp> files. Sure enough, C<pp_pack> is in F<pp.c>. Since we're going to be @@ -1647,36 +1651,6 @@ this text in the description of C<pack>: pattern with C<C0> (or anything else) to force Perl not to UTF-8 encode your string, and then follow this with a C<U*> somewhere in your pattern. -All done. Now let's create the patch. F<Porting/patching.pod> tells us -that if we're making major changes, we should copy the entire directory -to somewhere safe before we begin fiddling, and then do - - diff -ruN old new > patch - -However, we know which files we've changed, and we can simply do this: - - diff -u pp.c~ pp.c > patch - diff -u t/op/pack.t~ t/op/pack.t >> patch - diff -u pod/perlfunc.pod~ pod/perlfunc.pod >> patch - -We end up with a patch looking a little like this: - - --- pp.c~ Fri Jun 02 04:34:10 2000 - +++ pp.c Fri Jun 16 11:37:25 2000 - @@ -4375,6 +4375,7 @@ - register I32 items; - STRLEN fromlen; - register char *pat = SvPVx(*++MARK, fromlen); - + char *patcopy; - register char *patend = pat + fromlen; - register I32 len; - I32 datumtype; - @@ -4405,6 +4406,7 @@ - ... - -And finally, we submit it, with our rationale, to perl5-porters. Job -done! - =head2 Patching a core module This works just like patching anything else, with an extra |