Browse files

Fixed a few issues, tested patching against perl-5.6.1 source tree an…

…d it works now.
  • Loading branch information...
1 parent 09dfd7d commit 225c1ddde7fe4bdf568fba7784da4e4599444cf5 @bingos committed May 18, 2010
Showing with 13 additions and 4 deletions.
  1. +10 −0 Changes
  2. +3 −4 lib/Devel/PatchPerl.pm
View
10 Changes
@@ -1,3 +1,13 @@
+==============================
+2010-05-18 00:33:32 +0100 0.04
+==============================
+
+ commit 09dfd7daa6a1fe5bc172aad1ad1d57eb0af86227
+ Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
+ Date: Tue May 18 00:33:32 2010 +0100
+
+ Fixed a bug calling patch_source as a exported function
+
==============
End of Excerpt
==============
View
7 lib/Devel/PatchPerl.pm
@@ -8,7 +8,7 @@ use IO::File;
use IPC::Cmd qw[can_run run];
use vars qw[$VERSION @ISA @EXPORT_OK];
-$VERSION = '0.04';
+$VERSION = '0.06';
@ISA = qw(Exporter);
@EXPORT_OK = qw(patch_source);
@@ -108,7 +108,6 @@ sub patch_source {
my $source = shift || '.';
$source = File::Spec->rel2abs($source);
warn "No patch utility found\n" unless $patch_exe;
- return;
{
local $CWD = $source;
for my $p ( grep { _is( $_->{perl}, $vers ) } @patch ) {
@@ -242,7 +241,7 @@ END
sub _patch_makedepend_lc
{
- patch(<<'END');
+ _patch(<<'END');
--- makedepend.SH
+++ makedepend.SH
@@ -58,6 +58,10 @@ case $PERL_CONFIG_SH in
@@ -265,7 +264,7 @@ sub _patch
print "patching $_\n" for $patch =~ /^\+{3}\s+(\S+)/gm;
my $diff = 'tmp.diff';
_write_or_die($diff, $patch);
- _run_or_die($patch_exe, '-s', '-p0', "<$diff");
+ _run_or_die("$patch_exe -s -p0 <$diff");
unlink $diff or die "unlink $diff: $!\n";
}

0 comments on commit 225c1dd

Please sign in to comment.