Subject: | IO::File is not loaded automatically in older perls |
Build and/or tests fail for older perls (<= 5.12.5) because IO::File (or IO::Handle) is not automatically loaded if methods are seen on file handles.
The attached patch fixes this, but this works only for perl 5.12.x. There are still other errors with older perls (e.g. Can't locate object method "binmode" via package "IO::Handle"), so maybe you want to set the minimum perl version, too.
Regards,
Slaven
Subject: | 0001-explicitly-load-IO-File.patch |
From 5209d1dfbcb861ab43ceffea7bd9e38c7e4b7e89 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <cpansand@eserte>
Date: Wed, 8 Jun 2016 06:03:48 +0000
Subject: [PATCH] explicitly load IO::File
---
lib/App/Music/ChordPro.pm | 1 +
script/chordpro.PL | 2 ++
2 files changed, 3 insertions(+)
diff --git a/lib/App/Music/ChordPro.pm b/lib/App/Music/ChordPro.pm
index b76cc2f..23e83cd 100644
--- a/lib/App/Music/ChordPro.pm
+++ b/lib/App/Music/ChordPro.pm
@@ -36,6 +36,7 @@ L<http://www.chordpro.org>.
use strict;
use warnings;
use Data::Dumper;
+use IO::File;
################ The Process ################
diff --git a/script/chordpro.PL b/script/chordpro.PL
index 7411c81..bffacff 100644
--- a/script/chordpro.PL
+++ b/script/chordpro.PL
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+use IO::File;
+
my $src = shift;
open( my $fd, ">", $src);
open( my $fi, "<", "$src.pl" );
--
2.1.4