aboutsummaryrefslogtreecommitdiff
path: root/textproc/p5-Text-RecordParser
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2004-05-06 14:16:55 +0000
committerMathieu Arnold <mat@FreeBSD.org>2004-05-06 14:16:55 +0000
commit580907f6e3905c5a9c19dcbd3a5522d01a6d8c95 (patch)
treea7a7472992fdb8886a4393ff3a970bd2c58e7b3d /textproc/p5-Text-RecordParser
parented8794f6e7bec87c600f479d8191e894a118e58f (diff)
downloadports-580907f6e3905c5a9c19dcbd3a5522d01a6d8c95.tar.gz
ports-580907f6e3905c5a9c19dcbd3a5522d01a6d8c95.zip
Add a small patch so that 5.005 works too
Approved by: maintainer
Notes
Notes: svn path=/head/; revision=108559
Diffstat (limited to 'textproc/p5-Text-RecordParser')
-rw-r--r--textproc/p5-Text-RecordParser/Makefile2
-rw-r--r--textproc/p5-Text-RecordParser/files/5.005-RecordParser.pm24
2 files changed, 25 insertions, 1 deletions
diff --git a/textproc/p5-Text-RecordParser/Makefile b/textproc/p5-Text-RecordParser/Makefile
index 1ebe4b63e021..91eae2d41654 100644
--- a/textproc/p5-Text-RecordParser/Makefile
+++ b/textproc/p5-Text-RecordParser/Makefile
@@ -24,7 +24,7 @@ MAN3= Text::RecordParser.3
.include <bsd.port.pre.mk>
.if ${PERL_LEVEL} < 500601
-IGNORE= "requires perl 5.6.x or later. Install lang/perl5 and try again"
+EXTRA_PATCHES= ${PATCHDIR}/5.005-RecordParser.pm
.endif
.include <bsd.port.post.mk>
diff --git a/textproc/p5-Text-RecordParser/files/5.005-RecordParser.pm b/textproc/p5-Text-RecordParser/files/5.005-RecordParser.pm
new file mode 100644
index 000000000000..473b8f0e753f
--- /dev/null
+++ b/textproc/p5-Text-RecordParser/files/5.005-RecordParser.pm
@@ -0,0 +1,24 @@
+--- RecordParser.pm~ Tue Dec 16 21:43:05 2003
++++ RecordParser.pm Thu May 6 11:45:45 2004
+@@ -523,8 +523,8 @@
+
+ if ( !defined $self->{'fh'} && $self->{'filename'} ) {
+ my $file = $self->{'filename'};
+- open my $fh, "<$file" or croak("Cannot read '$file': $!");
+- $self->{'fh'} = $fh;
++ open FH, "<$file" or croak("Cannot read '$file': $!");
++ $self->{'fh'} = \*FH;
+ }
+
+ return $self->{'fh'};
+@@ -727,8 +727,8 @@
+ croak( "Cannot use directory '$filename' as input source" );
+ }
+ elsif ( -f _ && -r _ ) {
+- if ( my $fh = $self->fh ) {
+- close $fh or croak(
++ if ( $self->fh ) {
++ close $self->fh or croak(
+ "Can't close '", $self->{'filename'}, "': $!\n"
+ );
+ $self->{'fh'} = undef;