in reply to How to patch modules with CPAN patch releases

Personally I can never figure out the correct -p0, -p1, -p2 incantation to get patch to work correctly. Yes, I understand what the -pn options do, but I always end up getting the wrong number because of fencepost errors.

My general technique is to try -p0, -p1, -p2, etc in conjunction with the --dry-run option until something looks like it's worked, then re-do without --dry-run.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
  • Comment on Re: How to patch modules with CPAN patch releases