develooper Front page | perl.perl5.porters | Postings from June 2008

Re: [PATCH] perlbug prose patch (and some evals, too)

Thread Previous | Thread Next
Craig A. Berry
June 7, 2008 20:35
Re: [PATCH] perlbug prose patch (and some evals, too)
Message ID:
On Sat, Jun 7, 2008 at 4:10 PM, Jesse Vincent <> wrote:
> I didn't manage to figure out the right way to supply a
> patch to a .PL file in the utils/ directory, so this patch was written to
> apply to an extracted copy of the perlbug utility (though it applies cleanly
> to perlbug.PL.)  What's the _right_ way to patch such things?

I don't know of a reason it would be any different from patching any
type of generated file.  If you are patching a .xs file, you edit the
.xs file, run it through xsubpp, compile, test, curse, repeat.  If you
are modifying embed.h, you edit embed.fnc and/or and run
C<make regen_headers>.  In your case, editing utils/perlbug.PL
followed by C<make lib/perlbug> would probably do the trick, or if you
want to break it down further, C<perl utils/perlbug.PL> would give you
a utils/perlbug that you could tinker around with until it did what
you wanted.

Generally speaking, it's best to edit the upstream file and consider
regenerating its installable result as part of your testing.  However,
I know people who have heard of people witnessing other people who
claim to have said that it's possible to just edit the target file,
generate a patch from it, and then mess with the filenames and line
numbers in the patch until it applies cleanly.  Needless to say, such
things are not done in polite company.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About