aboutsummaryrefslogtreecommitdiff
path: root/textproc/p5-Text-RecordParser
diff options
context:
space:
mode:
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;